In the Jobs Form if Materials used = Y, then open the Materials Form to add materials, if N Do Nothing (Stay in the Jobs Form)

I am trying to add an IF statement in the Jobs Form as follows:
If [Materials Used] = Y,
[Materials Form], “Job No” [Job No], (Open the Materials form and populate the Job No field in the Materials Field with the Job No from the Jobs form),
Otherwise Do Nothing (Stay in the Jobs Form)

Any help would be appreciated
Pat

@PatFF
It can be achieved like this:
1.) From UX > Options set Advance forms automatically property to ON
2.) If possible make [Materials Used] column as your last field in your form before save and make it an ENUM or YES/NO column if not
3.) Open your Jobs_Form View and set it to Auto Save
4.) Set an Action and Jobs table with Data: goto another view with in this app and set a LINKTOFORM expression in Target property


4.1) From the Behavior of this action, set Only if this condition is true expression to:
[Materials Used] = TRUE // if it's a Yes/No type column

OR

[Materials Used] = "YourEnumValueHere" // if it's an Enum type column

5.) Assign this action to the Form Saved property of your Jobs_Form View

3 Likes

Hi Levent
Thank you very much for the solution.
I would not have known to set Advance forms automatically property to ON or Set to auto Save, or Assign the Action to Form Saved.
It works great.
Pat

1 Like

You’re welcome. Glad to hear that you’ve figured it out.

It was also a good learning experience.

1 Like

I’ll be glad provided you can mark my reply post as the solution.

Sorry - I missed that option - Done Now

Apppreciated, thanks but I believe you have unintentionally marked the wrong post of mine as the solution :wink:

Thank you again - I have marked this post as the solution
Pat

1 Like