Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
3400_how_to:1200_tips_and_tricks [2022/08/21 22:48] – ↷ Page moved from docs:3400_how_to:1200_tips_and_tricks to 3400_how_to:1200_tips_and_tricks administrator3400_how_to:1200_tips_and_tricks [2026/08/13 07:43] (current) – Imported by DokuWiki Advanced Plugin aware_support3
Line 1: Line 1:
-====== Tips and Tricks ======+===== Tips and Tricks ====== 
 + 
 +===== How to ... ===== 
 + 
 +<accordion autoclose> 
 + 
 +<anchor id="search_for_multiple_objects"> 
 +<accordion-item title="How to search for multiple objects"> 
 + 
 +Sometimes you may need to search for instances of different business object based on the values of attributes common to all of them. For example, let us assume you have defined ''SavingAccount'' and ''CreditAccount'' objects. Both objects contain different attributes and yet both of them have the Balance attribute defined. Suppose you want to find all accounts (saving and credit) with the balance greater than 1000 dollars. 
 + 
 +The solution is to add both objects to a business group (called ''Account'', for example) – see the “[[2500_config_apps:1000_add_edit_bogs|Adding/Editing Business Object Groups]]” section – and define a query that will look for the business object group rather than an individual business object (see the “[[2500_config_apps:1100_add_edit_queries|Adding/Editing Queries]]” section). 
 +</accordion-item> 
 + 
 +<anchor id="what_to_do_if_an_object_can_be_related_to_multiple_objects"> 
 +<accordion-item title="What to do if an object can be related to multiple objects"> 
 +Sometimes when you define relationships between business objects you may want to establish a relationship with different business object through the same reference attribute. For example, let us assume that you are defining an ''Account'' object and you want to establish a relationship between the account and its transactions by defining the ''MyTransactions'' reference attribute. However, you have several business objects that represent transactions – ''WithdrawalTransaction'' and ''DepositTransaction''. These transactions have some different attributes and some common attributes (for example ''Amount'').  
 + 
 +The solution is to add different objects representing transactions into a business object group (called ''Transaction'', for example) - see the “[[2500_config_apps:1000_add_edit_bogs|Adding/Editing Business Object Groups]]” section – and get the reference attribute to refer to a business object group rather than the individual business object (see the “[[2500_config_apps:0700_add_edit_attributes:0500_ref_attrib|Setting Properties of Reference Attributes]]” section). 
 +</accordion-item> 
 + 
 +<anchor id="display_currency_symbol"> 
 +<accordion-item title="How to display currency symbol"> 
 + 
 +If some attribute of a business object represents currency, then you may want to display the value of the attribute with the currency symbol in front of the value – for example, $400. To do this define the attribute to be of the Number type and add the currency symbol to the format of the number – for example, “$#” - see “[[2500_config_apps:0700_add_edit_attributes:0300_number_attributes|Attributes of Number Type]]”, [[8000_appendices:0300_number_format_java|Appendix C]]. The value of the attribute will be displayed with the currency symbol on all forms. If you want to display the currency symbol only in certain reports, you should not change the format of the attribute, but instead include the currency symbol inside the tags of the report, for example: 
 + 
 +<code aim><<Account.Balance, $#.00>> </code> 
 +</accordion-item> 
 +<anchor id="generate_unique_id_for_the_attribute"> 
 +<accordion-item title="How to generate unique ID for the attribute"> 
 + 
 +In many cases it is necessary to have a number uniquely identifying business elements, such as customer number, order number, account number, etc. If you have no particular requirements on the numbering of your objects you can simply use the ID attribute. 
 + 
 +If you need to control the numbering of your business objects you will need to configure the attribute for this purpose of the Number type and mark it as “auto-incremented” 
 +</accordion-item> 
 + 
 +<anchor id="compare_strings_ignoring_case"> 
 +<accordion-item title="How to compare strings ignoring case"> 
 + 
 +Use ''[[ref:a_f:f:af:to_lower_case|TO_LOWER_CASE]]'' or ''[[ref:a_f:f:af:to_upper_case|TO_UPPER_CASE]]'' functions to convert both strings to upper or lower case and then compare them. See also the “[[ref:a_f:f:60_txt|Text Functions]]” section. 
 +</accordion-item> 
 + 
 +</accordion> 
 + 
  
-{{simplenavi>documentation:3400_how_to:1200_tips_and_tricks}}