Hello,
Appsheet newbie. Within our app, we are adding items to a database. If the new row is a specific type, we need to we navigate to another form (after the action is saved), to enter additional data. But if the new row is a different type, the app should navigate to the existing default view.
For example:
Action: Adding New Car
Form: Car_Form
Requirement
If the โCarTypeโ = โConvertibleโ,
Then
After saving the entry, we need to go to โConvertibleDetails_Formโ to enter additional
details (e.g. hard top, soft top, top color, etc.)
If the โCarTypeโ is not โConvertibleโ
go to to the โCarListโ
Current Navigation
After a new entry is added, the system generated action is automatically taking the user to the CarList.
Question
Is there a method or expression to add navigation conditions to the system generated Save action, based on the data type (e.g. Convertible, Not Convertible)?
Thanks,
Alex
You could create show-if columns condition to only show those column if [CarType] = โConvertibleโ.
Your use case appears to be similar to form branching. Your use case may be different than described in the article below if your forms are on different tables so you may need navigation. However you may also take a look at the following help article that adds to the guidance of using Show_if constraint mentioned by @Heru
If you are looking for something else , please post back with more details of your requirement.
Hello,
Unfortunately, the article was not applicable to our specific use case.
Using the car analogy:
Action: Adding New Car
Form: Car_Form
Requirements
If the โCarTypeโ is not โConvertibleโ
go to to the โCarListโ
Actions
Create a new Car with Add Car Action (currently handled by a System Action)
Add new Car to Car table
Navigational Branch Requirement
After creating the new car, as a new row in the Car Table, (this is currently is handled by the system action), the app needs conditional logic that either:
A. Sends the user to the ConvertibleDetails_Form
If the CarType is Convertible
Or
B. Sends the user to the CarList table
If the CarType is not Convertible
In other words,
The Form Saved event action, of the Car_Form form view, has to first add the new record to the database (Car table) and then use the logic to determine which form to navigate the user to (either the ConvertibleDetails_Form or the CarList Form).
Hello,
There is a small piece I am missing. In the Behavior section of the form (Event Actions), I am not seeing an option or formula bar that allows me to set the conditional Navigation.
I also checked in the โFinish viewโ option.
Alex
You could set the conditional nvaigation in the action itself. So you will have only one โon form saveโ event action with an expression something like
IFS([_THISROW].[Car Type]=โConvertibleโ, LINKTOFORM(โConvertibleDetails_Formโ, โCar Table Keyโ,[Car Table Referencing Column in Child Table]), [_THISROW].[Order Status]=โNot Convertibleโ, LINKTOFORM(โCarList Formโ, โCar Table Keyโ,[Car Table Referencing Column in Child Table]))
You will need LINKTOFORM() if you wish to pass on some values (such as reference column needed to create parent and child record relation) from saved Car Table record to the ConvertibleDetails_Form or the CarList Form. Or else only LINKTOVIEW() would suffice.
Where would I put the LINKTOFORM() logic? I can create a process, but the tasks seem limited to:
I donโt see a โuse logicโ option.
Thanks,
Scott
Bots (and their Processes and Tasks) are server-side executions, they donโt do anything for the user/client UI. Thus you canโt use deep links like LINKTOFORM. Those are only available in Actions.
I see. Can you suggest a way to determine where to go when a record is saved based on the contents of that record? I would like to either open a different kind of record or go to the original record list based on a field value.
Thanks,
Scott
Set an Action as a Form Saved Behavior.
EDIT: โฆwhich is already something that has been indicated in this thread. Perhaps you should reread this thread a bit closer.
Thanks for the idea!
You can create an action that navigates to the desired target an attach the action as the Form Saved event action of the Car_Form form view:
I actually was trying to do exactly that. I want to create an event action that calls LINKTOFORM when the form is saved, but I donโt know how to do that. I thought I would have create a process/task, but that seems incorrect.
Scott
Ah, I see. I was looking in a different area but understand now.
Thank you.
User | Count |
---|---|
43 | |
29 | |
23 | |
20 | |
13 |