Hi all!
In the โBehaviourโ section of the AppSheet, we have system generated actions like โEditโ, โAddโ, โDeleteโ. The โBehaviourโ section of each of these actions is supposed to allow a condition based appearance of these actions. However, they donโt work for me as intended.
Iโll give an example.
Thereโs a โNewโ button that is shown at the end of each inline view of a child table when Iโm in the parent tableโs detail view. This โNewโ button disappears when the system generated action โAddโ pertaining to the child table is set to โDo not displayโ from the โprominenceโ option in the โAppearanceโ section. But if I try to get it to disappear by writing an expression through the โOnly if this condition is trueโ of the โBehaviourโ section, it doesnโt work. I wanted the โNewโ button to disappear if a column called โFollow up_SUMโ returns a value of โ9โ, but show only if the value is 0,1,3,4,5,6,8. But this doesnโt work, and the โNewโ button is still shown when the value is โ9โ. The weird thing is, if I go and take off the value โ0โ from the show only if expression (which means, if the โFollow up_SUMโ column returns the value of โ0โ, the โNewโ button should not be shown), the โNewโ button disappears as intended. But that is not what I want, I want the โNewโ button to disappear if the value returned is โ9โ. I canโt get it to work though.
Any reason for this behaviour?
Thanks.
What was the exact expression you entered in the show condition? Also what is the column type for Follow up_SUM?
What expression are you using for Only if this condition is true?
What if you replace your existing Only if this condition is true expression with:
[Followup_Ref].[Follow up_SUM] <> 9
or:
IN([Followup_Ref].[Follow up_SUM], LIST(0, 1, 3, 5, 6, 8))
Iโm actually kinda surprised that youโve gotten any expression to work that references the current row.
+Steve Coile Thank you for the reply. I tried both. The former didnโt have any impact at all. The latter while removed the โNewโ button from the Inline view (in a previous record where all 3 inputs have been entered by me), it also removed the ability to access the โFollow upโ referenced virtual column from the Personal Details Form view at the beginning of a new data input. This is exactly my problem. Iโve added 2 photos below for your kind perusal.
Iโm afraid Iโm at a loss. The behavior youโre experiencing itโs odd, but Iโm not convinced itโs a bug in AppSheet. The setup youโve described is complex; thereโs nothing more I can offer without a great deal more understanding of your app.
+Steve Coile Thanks for the reply. How to make you more understand my app? Can I give you a copy of it and transfer the authorship to your email? Is it possible to do that in AppSheet?
@Malaka_Jayawardene, that is possible, yes. You can copy the app with Manage > Author > Copy App, then from the copy, you can share the copy with me from Users > Users > SHARE YOUR APP WITH, being sure to set Add as co-authors? to ON. This will share the copy with me and allow me to see and change the copy. You will retain full access of the copy and can revoke my access at any time.
@RezaRaoofi โFollow up_SUMโ is a number type virtual column that sums up the values in a number type virtual column called โFollow up counterโ.
In my app, โPersonal Detailsโ is the parent table and, โFollow upโ table is one of several child tables referenced to the parent table.
โFollow upโ table has an enum type column to select 3 options (Clinic review, Recurrence, Death). I made it in such a way that the user can only select one from each of these options per patient (that means, the โFollow upโ table which is a child table to the โPersonal Detailsโ parent table would only record 1 clinic review, 1 recurrence and 1 death per patient. Selecting the clinic review opens up another child table โClinic Reviewsโ which records multiple clinic records under that.). If the user selects clinic review from the Enum type column in the โFollow upโ table, it would return a value of 1 in the โFollow up counterโ virtual column, and if the user selects โRecurrenceโ, it would return a value of 3, and if โDeathโ, a value of 5. Since only 1 of each can be selected, the cumulative values can be either 0, 1, 3, 4, 6, 8, and 9 and it is the โFollow up_SUMโ virtual column in the personal details parent table that sums these values up by the expression SUM(SELECT(Follow up[Follow up counter],[Followup_Ref]=[_THISROW],TRUE)).
Since the โFollow upโ table is a child table to the โPersonal Detailsโ parent table (referred by โFollowup_Refโ ref type column), the expression [Followup_Ref].[Follow up_SUM] brings the โFollow up_SUMโ virtual columnโs value back to the โFollow upโ table so that I can use it in the part of the Behaviour section of AppSheet. I wanted the โNewโ button to disappear in the inline view of the โFollow upโ table once user uses up all 3 options, so that the user wonโt be presented with a โNewโ button anymore. To do that, the โNewโ button should not appear once the โFollow up_SUMโ is equal to โ9โ (1+3+5 = 9), and the โNewโ button should appear if โFollow up_SUMโ appears to be 0, 1, 3, 5, 6, or 8. So I wrote on the section the following: OR([Followup_Ref].[Follow up_SUM]=0,[Followup_Ref].[Follow up_SUM]=1, [Followup_Ref].[Follow up_SUM]=3, [Followup_Ref].[Follow up_SUM]=5, [Followup_Ref].[Follow up_SUM]=6, [Followup_Ref].[Follow up_SUM]=8)
Thanks.
User | Count |
---|---|
40 | |
34 | |
30 | |
23 | |
17 |