Built in data key in keychain exp

Hi, I’m trying to bind the visibility of a text field based on the current page (only want it visible on last page of the report), so I tried this keychain expresion on the visibility property and it did not work: Page==PageMax?“True”:“False”
Is it my syntax, logic etc. that is incorrect or this is not doable using keychain expressions?
Keychain_exp_rpt

I don’t think you can code in bindings for that property, but you should be able to create a new parameter and have that parameter contain the logic you are trying to implement, then use the parameter as the key binding. The syntax in the parameter expression would be

if(chart.Page = chart.MaxPage, "True", "False")

Set the parameter type to boolean and that should work as you are intending.

https://docs.inductiveautomation.com/display/DOC80/Keychain+Expressions
I think you want a single equals, not a double equals.

EDIT: Nope, I’m wrong.

1 Like

:+1:Thanks for the reply, I tried it as a parameter, didn’t do the trick. What does ‘chart’ in your expression mean. I tried using ReportName.Page, TextField.Page but still not able to sneak in the built-in Page datakey in the expression.

@dylandaigle is referring to expression binding syntax while you’re asking about Reports key-chain expression but they are entirely different.

Single equals is for assignments and double equals is for comparison (as per the manual).

1 Like