Topic: Formula field syntax for parameters Posted: 06 Sep 2020 at 4:15pm
Hi.
I have multiple optional parameters in a report and want to include them in the report header. I've inserted a text box and listed the parameters, and I want the parameter values to appear against the related text for each parameter or the words 'not selected' if no parameter values are entered, eg:
'Date Range: 1/9/20 to 7/9/20' or 'Date Range: not selected'.
To achieve this outcome, I believe that I must create a formula field for each parameter, incorporating the parameter field into an If…Then…Else statement, then insert the formula field into the text box. However, I’m struggling to create the correct syntax for the formula.
Following is an example where the error message highlights the word ‘is’ and states that the keyword ‘then’ is missing:
(
if {?Submission Reason} is true
then {?Submission Reason}
else "not selected"
)
If I replace ‘is’ with ‘=’, then the parameter field is highlighted with a message indicating that a boolean array is required. I’ve tried several other variations but just continue to get different error messages.
Suggestions on the correct syntax would be greatly appreciated.
Cheers ...
Thank you, kevIray.
I eventually came up with the following syntax, which works perfectly:
(not HasValue({?Parameter}) OR {TABLE.FIELD} = {?Parameter})
I appreciate your assistance.
Cheers,
Carol
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum