Hi,
I added in a condition in the Behavior/action/document(child table)/add “Only if this condition is true”
CONTAINS((SELECT(User[Access],[Email]=USEREMAIL())),ANY(SELECT(Main[Topic],[Topic]=[_THISROW].[Topic])))
Where [Access] is a EnumList.
Tested the Expression everything looks fine.
It was suppose to show a ADD button at the document ref row at the parent page if the user is assigned to the topic. Now I’m stuck…
Photo of suppose to be below
Hi @BoonBoon
you can’t set a condition on the “add” button, as it is attached to the inline view.
you will have to display inline for another dataset, so you need to use a workaround.
I suggest you follow these steps:
REF_ROWS("children_slice_readOnly", "key_column")
REF_ROWS("children", "key_column")
CONTAINS((SELECT(User[Access],[Email]=USEREMAIL())),ANY(SELECT(Main[Topic],[Topic]=[_THISROW].[Topic])))
NOT(CONTAINS((SELECT(User[Access],[Email]=USEREMAIL())),ANY(SELECT(Main[Topic],[Topic]=[_THISROW].[Topic]))))
that should do the job.
Edit: added some missing information about the type of the new virtual column
Hi @Aurelien
It will work if I only compare to a constant value like ANY(SELECT(User[Access Level],[Email]=USEREMAIL())))>=3000, but it don’t work if I compare to a [_THISROW]. Anyway I’m out of option. Will give your method a try and update again.
Additional information:
I just made a sample app for educational purpose so that you can look under the hood.
You can find it in my portfolio:
https://www.appsheet.com/portfolio/1723746
If this is what you need:
Hi @Aurelien
Nice, this is what I mean. But I have quite a few child item under 1 parent page. Guess I have to do 1 slice for each of them just to hide the add button if user is not authorised to add item. If that’s the only workaround… Thanks for the suggestion.
Hi @BoonBoon
You don’t have too.
You slice is made of a row filter condition.
If this row filter condition takes the user into account in the expression, there is no need to make various slices, only one is enough.
You get what I mean ?
for reference:
Hi @Aurelien
What i mean is i have to do a slice for each of the following related child row. Unless i understand it wrongly. lol…
Hi @BoonBoon
About this point, yes you are right.
User | Count |
---|---|
43 | |
32 | |
25 | |
23 | |
14 |