For the best understanding of these expressions, you can watch the recording again. However, the main expressions we used were the IiF(,,) and StartsWith(‘’,’’) expressions.
The IiF(,,) function requires a data field to tell it what to check against – to see if it’s true or false – and also information about what to do if it’s true and what to do if it’s false. You can think of it like this:
Iif ([My Data Field], [What to do if True], [What to do if False])
So if we’re asking “check the Registration Type field to see if says Junior Member, and if it does, make the background yellow – otherwise, make it white”, our expression would read:
In this case, we're using the == to say "if registration type matches exactly with Junior Member", then saying what to do if that's true, and what to do if it's not true.
The other expression was StartsWith('','') . For this, you need to specify where to look, and what to look for at the start of whatever it is. Unlike the Iif(,,) there are two sets of single quotation marks in the default expression. But you can remove the first set if you're using fields from the fields list in the Report Explorer. The second set requires a value to be entered between the two quotation marks to tell the system what to check at the start of the element. You can look at it in this way:
StartsWith([My Field Without Quotations],’my value’)
So in the expression below, we're saying "check under the custom field that I set up under registration" and "look for anything starting with 6".
In the examples in the webinar video, we also looked at other variations, such as having multiple options to check against with different ‘true’ results. For more info, watch the video again or review the other help materials.