Hide Form fields based on table data

I have a SQL query populating a table and a Form Detail. When a row is selected I would like to show or hide fields based on the value of a field in that row. If the "Platform" field is set to "Win" I want to hide the MacModel form field. How do I go about doing this?

Thanks in advance!

In the "hidden" property (in the Appearance section) for the "MacModel" field in the form, use {{ selectedRow.Platform == 'Win' ? true | false }} {{ dataTable.selectedRow.Platform == 'Win' ? true : false }}

Thanks! That did the trick. But I had to specify the table and reference the data as follows:

{{ dataTable.selectedRow.data.Platform == 'Win' }}

Good catch, I also used | when it should have been :. I will edit my answer for anyone who stumbles upon it in the future...using {{ dataTable.selectedRow.Platform == 'Win' ? true : false }} should work as well as your perfectly good approach.

1 Like