Hi, I am making an application in which I want to allow only one data to be loaded per referenced row. That is, I need to hide the “Add” button when there is already a row saved.
To do this, I create the slices for each “related” column, set them to “READ ONLY”, then go to Data–> Columns and create the virtual columns with their respective “READ ONLY SLICES” as source and use the expression COUNT([Related Column)=0/1 in the “Show_IF” section to toggle between both columns to get the effect that the “Add” button disappears when adding an entry.
I’ve done this with other apps…and it worked fine.
The problem is that I’m trying to replicate it after having success with other apps, and I can’t get the expected result.
What happens is that every condition that I enter in “SHOW_IF” is totally ignored by appsheet and it keeps showing the column that has the expression to hide itself and the “Add” or “new” button.
I attach screenshots.
This is the Slice
Here the ref column and the slice Read_only
and this is the result:
Looks like the Read Only slice works good, but the “Related Column” didnt hide.
The show_if expression is
COUNT([Related Column]) = 0
when no entry is recorded in child table “Add” button must show itself, but if one entry is recorded the related column must hide itself, and the slice show instead.
But this didnt work this time.
Am I doing something wrong? is this a bug? I have checked this same procedure in other apps I have done and it works correctly.
Should I make a ticket to support?
Any help would be welcome.