Hi everyone,
I would like to hide the “Add” button on a detailed view, depending a condition. I found some articles where people succeeded into it, but cannot reproduce the expected behavior.
The purpose is to avoid adding new children to a parent, after a period of time (in this case, the day following the entry).
I added a condition on the Behavior/Actions panel:
I proceeded to various tests, and this is what happens:
But when I click on the “test” formula button, the results are as expected: “N” on old entries, “Y” on recent ones.
Do you have any clue on what happens ? Is that a bug, or a misunderstanding from me ?
Thanks for your help
Aurelien
This not under the behavior panel.
What you need to do is to
create two slices. The first one has update mode of adds, and the second one is read-only
You should have 2 ref tables on that table.
A. Line items that refers to the slice that has add on it
B. Line items that tefers to the read-only slice
Lastly, adjust the show if of the two ref tables
Hi @June_Corpuz
Thank you for your answer, I will try this and let you know if that works.
Do you know why my first attemtp does not work, like if it’s a bug or just a mistake I made ?
Maybe someone from AppSheet team can explain it you @Steve
Please post a screenshot of the Add action for the LineItem_Pdt table, and of its complete If this condition is true expression.
Hi @Steve
Here you are
EDIT : Mvt refers to the Key of the table Mvt. I should have called it “keyMvt”
This expression is invalid:
Is Mvt a column in the LineItem_Pdt table? Is Timestamp?
yes:
Mvt is the column in the LineItem_Pdt table, wich refers to the key column of the Mouvements_Pdt
TimeStamp is a column from Mouvements_Pdt
Okay, so at the very least, the expression should instead be:
[Mvt].[TimeStamp]>today()
(i.e., remove the Mouvements_Pdt
prefix)
Is the TimeStamp column of type Date, of type DateTime, or of type Time?
TimeStamp is of datetime type
Then the expression should be either:
[Mvt].[TimeStamp]>now()
or:
date([Mvt].[TimeStamp])>today()
depending on what comparison you’re trying to achieve.
Great, thank you ! I will try that immediately and let you know
Unfortunately…still does not want to work
I made a slight change to include today in the condition, as you see.
Do you want to access the app to look further, or do you want me to provide more informations or tests ?
I think someone’s going to have to look at your app. Please contact support@appsheet.com for further help with this.
Ok, I will do that.
Thank you yet for the time you spent on my case !
User | Count |
---|---|
43 | |
25 | |
23 | |
14 | |
13 |