Changes

Jump to: navigation, search

The Musings of Chin - Correct Variable Processor Use

32 bytes added, 19:44, 15 January 2015
no edit summary
Reason:
When you create a new Level 1 it will look like the condition's working as you don't see the field, but in reality this will cause server errors as the ''@opportunityid@ '' is not replaced as that value does not yet exist for new Level 1s. An error will cause the visibility condition to always fail, which will lead to undesired behaviour.
Solution:
''"@opportunityid@"*1>0''
Note: For this particular example, there is a check box setting within the custom field configuration that allows you to hide fields on new objects until the object is saved at least once.
''"@ReportProperty(12345,recordcount)@"*1 + "@custom number@"*1''
The ''*1'' is used to explicitly cast the result into a numeric value. This is needed in the case so that perhaps , if your ''@custom number@'' contains an alphabetic character, the ''*1'' will convert it to a 0. If for some reason you use a @ReportProperty()@ that returns blank, ''""*1'' will also convert to a 0.
'''Problem 2''':
The following situations should be considered:
1) The ''.inRole '' variable will always return the values of true or false so there is no need to encapsulate this within double quotes (i.e. ''@me.inRole(Organization Contact)@'').
2) When the variable value you are retrieving contains double quotes within itself you will need to escape these, or encapsulate the variable within single quotes if you are sure the variable value does not contain single quotes within.
* [[inRole]]
[[Category:Chin’s MusingsExpert Tips and Tricks]] [[Category:Variables]][[Category:Chin’s Musings]]
526
edits

Navigation menu