Hello, I have actions configured for copying a parent/child scenario - Job Order Header/Job Order Detail. Both the the job order header & detail have valid if expressions in place preventing the user and another field from being duplicated but since the same job order is being copied with the same job order no (not a unique id or key), its ok to make the copy When I run the copy, it fails as a result of the duplication.
Here’s my expression for the user id that’s failing with my attempt and stating if the user is in the lis but its the same job order its ok to include it in the listing.
Is there a way to indicate exceptions to the Valid ifs in an expression? I have this issue in many areas of my app so any help on thinking this one through would be outstanding.
Is there a way to indicate exceptions to the Valid ifs in an expression?
Yes, as it’s an expression, so you can handle any exception that can be expressed by an expression. The problem here is that an expression can’t inherently recognize it’s being evaluated in the context of an action.
Are you trying to use App: copy this row and edit the copy?
CONTEXT("ViewType") gets the view type (e.g., detail, form, gallery) of the view currently displayed to the user.
("form" <> ...) asks, is the currently-displayed view not a form-type view?
LIST([_THIS]) sets the list of valid values for the column to the value it currently has if and only if the answer to (2) is “yes” (i.e., the user is not in a form).
Replace expression-for-forms with the expression you want to use if and only if the answer to (2) is “no” (i.e., the user is in a form).
Based on the SELECT() expression you provided, it appears you’re using Valid If to provide the form user with a dropdown menu, so I’ve structured my expression for that. We’d have to tweak the expression if you instead want a simple valid/invalid result.