Dynamic form action: Conditional deep link action to another app; else the Default view after hitting sav

addled
New Member

Hi,
have a simple expense tracking app. In a form view, Columns such as user, type, category amount etc. are filled. The resulting data is displayed in various relevant ways

Iโ€™ve constructed a deep link (linktoform) to another App if the โ€˜Categoryโ€™ chosen/mentioned (I allow additional values in the Enum) is a particular value (โ€˜Sitaram salaryโ€™ for eg.) (which fills a form with a few values from the current form)
Deeplink:
LINKTOFORM(โ€œSalary formโ€,โ€œChoose account:โ€,โ€œAastha & Adiโ€, โ€œAmountโ€, if(isblank([_THISROW].[Amount (shared)]),[_THISROW].[Amount (shared)_13],[_THISROW].[Amount (shared)]),โ€œComments:โ€, if(isblank([_THISROW].[Comment (optional)]),[_THISROW].[Comment (optional)_14],[_THISROW].[Comment (optional)]))

I then created an action:
Go to another Appsheet app
if this condition is true:
and(contains([_THISROW].[Category],โ€œSitaramโ€),contains([_THISROW].[Category],โ€œSalaryโ€))
Need Confirmation?: On

Heres the question:
If I set my Form up to execute the above action to run on Form save. Will it go to the default view if above condition is not met? and conversely go to the deep link mentioned above if the condition IS met?

If not Could someone help me with the correct way to achieve this?
or an expression that can help?
TIA
best
Adi

0 4 347
  • UX
4 REPLIES 4

In general, your requirement looks feasible, if the understanding is correct.

Understanding:

  1. The LINKTOFORM() action is form save event action in app A. The action is to navigate to app B form with certain values in app B form being prefilled from app A form.

  2. There is a precondition in app A such as say [Category] of the app A current row contains two certain values.

  3. If the condition mentioned in 2 is not met, go to another view within app A

If so, we could discuss a possible way to achieve this.

Yes exactly

Okay, thank you.

  1. Please create a LINKTOFORM() action in app A such as below and called say GoToAppBFormAction
    Action Type: App: Go to another AppSheet app

LINKTOFORM( โ€œForm name of App Bโ€, [App A Column 1], " App B Column 1", [App A Column 2], โ€œApp B Column 2โ€, โ€ฆ[App A Column N], โ€œApp B Column Nโ€, โ€œApp B IDโ€)

Condition for this action as you want below

AND(CONTAINS([_THISROW].[Category],โ€œSitaramโ€),CONATAINS([_THISROW].[Category],โ€œSalaryโ€)))

  1. Create another LINKTOVIEW() action in-app A called say GoWithinAppAView
    Action Type: App: Go to another view within this app

LINKTOVIEW(โ€œView Name in App Aโ€)

The condition for this action
NOT (AND(CONTAINS([_THISROW].[Category],โ€œSitaramโ€),CONATAINS([_THISROW].[Category],โ€œSalaryโ€))))

  1. Create a group action with name such as AlternateNavigate in app A that has constituent actions as

GoToAppBFormAction
GoWithinAppAView

Condition for this group action: TRUE

Please make this action as form save event action on form in App A that you wish to the elternate navigations after form save. Prominence of all actions โ€œDo not displayโ€
Please pay attention to syntax, especially the App B ID that you need to include in the first action.

Aaah I get hte concept
Thank you so so much! This is perfect

Top Labels in this Space