Page 1 of 1

FirstIf not working in Enable Expression (SOLVED)

Posted: Mon Mar 10, 2025 10:49 am
by mariamtism
************************SOLVED************************

I have a table with data source "Products"
I want to enable/disbale each coulmn based on whether the column name exists in another datasource called "Template"
example
Products Table:
Code | Name | Price

on "Code" column's Enabled property, I want to have the following expression
FirstIf(Template.Value,Template.Key == "Code")

so that if the value "code" exists in the Template datasource and its value is true => the code column is displayed

however it does not work
i created a table for template and saw that the values were passed correctly
i tried creating a databand and setting the data source as Template => i tehn update my expression to read FirstIf(DataBand,Template.Value,Template.Key == "Code")

when i use the expression anywhere else (like displaying it in a table) it works fine, however in the Enabled property expression it does not
i also tried CountIf() but got the same result...


************************SOLUTION************************
turns out I had to set Calculation mode as Interpretation

<CalculationMode>Interpretation</CalculationMode>

Re: FirstIf not working in Enable Expression (SOLVED)

Posted: Tue Mar 11, 2025 10:08 am
by Lech Kulikowski
Hello,

Thank you for sharing your experience with other users.