About the new multipage functionality, the expression in “configure layout” has an unexpected behavior :
- record.randomNme==0 is always true
- record.values.column name always throw an error
How to explore the record comuns inside the expression in the conditional page layout ?
I tried theses expressions but none seemed to work :
Am I getting something wrong or should I open an Issue on gitHub ?
Thanks you in advance for your help !
@jfortun , @tjerman any ideas on this issue ?
Thank you very much !
These are the available variables
To access the record values you can do the expression you mentioned above.
record.values.column == '0'for example
The syntax for the expressions is similar to Expressions :: Corteza Docs. The only thing different is the variables present.
Same behavior is present on conditional fields on the Record page block.
Docs for layouts and conditional expressions are still in progress.
Here is a simple exemple but it doesn’t seem to work :
List of records :
Layout config :
Error when clicking on the record :
Thank you in advance for your help !
As i can see you’re using record in the expression on a non record page.
Since there is no record on a non record page, the expression evaluates to false and no layouts are shown.
Either try the expression on a record page layout or use something else than the record variable, for example try the width, or just use ‘true’ to test it.
Similar to record list prefilters, the record is only available on a record page.
I get the error when I click on the record to access the record page.
The expression is defined on the record page :
with the following layout configuration :
and the record page is :
I just retested it and can confirm the expression isn’t evaluated correctly. It was caused by an unfortunate edge case.
It has been fixed and will be released with 2023.3.2 (in 2 weeks)
The other variables except record should be ok