Using IIf in Data Section within Group

How do I write a workable IIf(,,,) expression to test the boolean column's value of the current data record within a group band's data section? I have tried endless variations, many of which generate an error about how the name of the record is not within the current context. In a text box I can easily show the value itself, but I cannot find a way to test that same value with IIf(,,,). Here is an example of what fails:

[IIf(ContactFamiles.Baptized,[Baptized],[Unbaptized])] even though this works fine: [ContactFamilies.Baptized]

Comments

  • Finally got it. Although I could see no visible difference, the column needed to be dragged into the IIf template using the expression editor, rather than just trying to type the same text in. Odd. This did work, even though I'm pretty sure I had earlier typed the exact same thing without using the expression editor:

    [IIf([ContactFamilies.Baptized] == true,[Baptized],[Unbaptized])]

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.