Hide action button depending on another dataset field value

Dear Experts need help please, I'm new to the appsheet.

I have 2 dataset, tickets and attachments. Both containts an issueid as keyfield. 
tickets dataset have a status field that holds the info if a ticket is new or ongoing.

I want the attachments add action(Fig 1) to be hidden once the tickets status is set to "ongoing".
I've tried so many expresions on show_if behavior but couldn't execute it correctly.

 
Fig 1
Jhun_4-1703735726777.png

Fig 2
Jhun_3-1703735673485.png

Here's my datasetsJhun_2-1703735544115.png

 

Thank you in advance.

 

 

 

Solved Solved
0 3 225
1 ACCEPTED SOLUTION

Update:
I just implement a workaround to meet the requirements.
What I did is...
1.) Create a slice from attachments dataset with read only update mode.
2.) Create a vitrual column with app formula referencing rows to the slice created.
3.) Add the virtual column to the views column order
4.) Lastly I added exresion to the show_if to dynamically hide or show the attachments column. "if status is new then the original attachement field show. if not, the virtual column is visible then the original will be hidden.

I don't know if this is the best practice but this workaround works perfectly in my case.
Regards

View solution in original post

3 REPLIES 3

Okay my friend here is your solution,

You have to go to the actions, go to attachments and the add action.

If I understood correctly the attachment table is the one that you want to prevent adding correct?

Well, scroll down the page and go to behavior, you'll see that this is set as true by default, edit this and use the following expression: 

[status]="New"

This way you will prevent users to add new records when the status is different than new in this situation on going

 

Thanks my Friend,
I already tried this but the problem is that the status field is on the tickets dataset.

Update:
I just implement a workaround to meet the requirements.
What I did is...
1.) Create a slice from attachments dataset with read only update mode.
2.) Create a vitrual column with app formula referencing rows to the slice created.
3.) Add the virtual column to the views column order
4.) Lastly I added exresion to the show_if to dynamically hide or show the attachments column. "if status is new then the original attachement field show. if not, the virtual column is visible then the original will be hidden.

I don't know if this is the best practice but this workaround works perfectly in my case.
Regards

Top Labels in this Space