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.
Solved! Go to Solution.
I have the fix to this bug, delete your broken app and build up a New oneโฆ All the time I use appsheet this is the 3rd that I have this kind of bugs.
In all the fix was delete and remake the app.
For everyone if you notice that you appsheet or some function didnt work, appsheet get bugged and you must delete and rebuild your app to fix this.
What happens if you set no condition at all on show_if expression ?
You should have your two โrelatedโ columns, one with Add/View and the other with only View.
That may help going step by step ?
Let us know
@Aurelien thanks for reply,
If I donโt set any condition in the SHOW_IF, I just check and uncheck the box, it appears and disappears as checked/unchecked but any condition I add to the show_IF (tested with COUNT/ISBLANK/ISNOTBLANK/NOT(COUNT)) is completely ignored and works as if I didnโt set any condition, resulting in the 2 virtual columns (SLICE and Related Column) being shown.
But, the slice, working correctly, is hidden when there is no data entered, and is shown when there is already a data entered, hiding the โAddโ button.
The problem is with the โRelated Columnโ column, which is still shown despite the condition of hiding.
I also tried to create slices of the โRelated Columnsโ and set condition to see if this changed something, but either creating new virtual columns that copy the โRelated Columnsโ or using slices, the SHOW_IF still does not respond, it only works with the READ_ONLY slices, with the โAdd_Onlyโ slices it does not pay attention to the SHOW_IF condition, so it sounds a bit like an error or bug, or that Iโm doing something wrong and I have not discovered it yet. But Iโm still searching, as I mentioned, I have other apps configured in this way that do work.
What happens in the expression editor, when you click on the Test button for this expression ?
COUNT([Related Column])=0
Does the output match your expectation ?
I would suggest using ISBLANK() instead of COUNT, if that changes something.
Edit : if the condition on the show_if for related slice works, did you try NOT(yourConditionExpression) for the other one ?
Hey @Aurelien
Basically @Aplicaciones_Huinoil is trying to make a one-to-one relationship which should be similar in complexity as my case where I need diferent forms/inline views.
I strongly think this is a bug from the platform that sometimes it just doesnโt work as you configure it with the slices as the table source for inline views.
This made me think that:
Which is something I can confirm.
@Steve sorry to bother you but, have you seend this? Somethimes the VC type List ignores the fact that it should be pointing to a slice (and itโs actions and permissions) and instead it points to the table
@Aurelien I tried this
"I would suggest using ISBLANK() instead of COUNT, if that changes something.
Edit : if the condition on the show_if for related slice works, did you try NOT(yourConditionExpression) for the other one ?"
Didnt work, here the screeshots:
and here is the result:
as you can see didnt hide, the [PR] Column but the RO(Read only) works fine.
when i press โtestโ in the expression box, gives me the following results:
In this screen i tried to change [_This] and set [PR] (Related column) but i the result is always the same, the Show_IF function didnt work properly with the related column.
i cant understand what the issue is.
Any help would be welcome.
Going all the way back to what you described in your original post, this expression:
should instead be:
COUNT([Related Puntos Revisiados]) <> 1
Note carefully the column name (Related Puntos Revisiados) and operator (<>
).
Exactly, the original name was โRelated Blablaโ but as I had the same problem, I tried to change the name to [PR] because in other apps where the SHOW_IF works, I had changed the name to [PR]. Obviously changing the name from โRelatedโ to โCustom Nameโ ([PR] in this case) didnโt solve the problem.
And i tried all kind of operators and other expressions like ISBLANK, ISNOTBLANK, NOTโฆ
Well thatโs super confusing. You shouldnโt change the problem even as weโre trying to help you. I donโt know how everything is setup now, and Iโm not going to wade through the thread to figure it out.
Your original problem was that your Show_If expression was wrong.
This is weird, some very subtle detail must have gone through our understanding.
As @SkrOYC suggested, may be a bug too.
I suggest you leave a request to the support team, in the โhow to questionโ section.
https://www.appsheet.com/Support/Contact
I think you should check out this link
I have the fix to this bug, delete your broken app and build up a New oneโฆ All the time I use appsheet this is the 3rd that I have this kind of bugs.
In all the fix was delete and remake the app.
For everyone if you notice that you appsheet or some function didnt work, appsheet get bugged and you must delete and rebuild your app to fix this.
Actually Iโm suspecting I need to do the same thing. But I would rather delete the columns instead of the whole app
I tried delete columns and didnt work, but I wish you gl to fix it soon. At least for me, only way is remake a New app, tyvm for your help& time.
User | Count |
---|---|
40 | |
36 | |
34 | |
23 | |
17 |