cancel
Showing results for 
Search instead for 
Did you mean: 

Can I make a field required based on dependency of another field?

Roast Chef
Roast Chef

Can I make a field required based on dependency of another field?

Jump to solution

For example, if I choose a certain Problem code (such as Leaking), I want the three Colorant fields to be required (ID is free form, Description is Multivalue Picklist, and Information is Picklist).

Req Field.png

But if the Problem code is not colorant related, the three Colorant fields shall not be required.  Is this do-able?

Thanks!

1 Solution

Accepted Solutions

Re: Can I make a field required based on dependency of another field?

Jump to solution

Dan,

Yes you can. The SFM transaction editor (where you add/change SFM processes) includes a tab called "Data Validation Rules". On that tab you can add one or more validation rules which will be enforced for that SFM. See below for an example. I took some liberties as I don't have the same custom fields in my demo org but it should give you an idea of what's involved. Essentially, you provide one or more expressions which, when found to be TRUE, will return the error provided in "Default Message". That can be a soft warning or a firm halt. In this example I specified that when Symptom = Leaking and Failure Location Is Null an error should be returned.

Data Validation Rule.jpg

The following help article provides a more detailed explanation of the feature and usage.

ServiceMax Online Help: SFM Data Validation Rules

View solution in original post

Re: Can I make a field required based on dependency of another field?

Jump to solution

Dan,

Yes you can. The SFM transaction editor (where you add/change SFM processes) includes a tab called "Data Validation Rules". On that tab you can add one or more validation rules which will be enforced for that SFM. See below for an example. I took some liberties as I don't have the same custom fields in my demo org but it should give you an idea of what's involved. Essentially, you provide one or more expressions which, when found to be TRUE, will return the error provided in "Default Message". That can be a soft warning or a firm halt. In this example I specified that when Symptom = Leaking and Failure Location Is Null an error should be returned.

Data Validation Rule.jpg

The following help article provides a more detailed explanation of the feature and usage.

ServiceMax Online Help: SFM Data Validation Rules

View solution in original post

Roast Chef
Roast Chef

Re: Can I make a field required based on dependency of another field?

Jump to solution

Chris - thanks so much!  Will test this out today and hopefully deploy over the weekend. Thanks for the link too!

Highlighted
Roast Chef
Roast Chef

Re: Can I make a field required based on dependency of another field?

Jump to solution

Worked like a charm.  Thanks for the direction!

Community Manager
Community Manager

Re: Can I make a field required based on dependency of another field?

Jump to solution

Thanks Chris Thompson‌ and Dan Schiess‌! Dan, if you believe Chris answered your question, would you mark his answer as correct and this question as answered?  If you have any questions about how to do that when you look at this thread, let me know and I can show you.  Chris gets credit (and points in our gamification engine!!) when you click to show he provided a correct answer!

Thanks so much!


____

Did you know solutions are the most powerful thing in this community?  When someone answers your question - only you can mark it as a solution.
Help other members find valuable content faster - Mark Responses As Solutions and give out Kudos (Likes)!
Line Chef
Line Chef

Re: Can I make a field required based on dependency of another field?

Jump to solution

Hey Chris Thompson​, I want to do something similar but the field I want to be required is just a text area not a picklist. From what I can tell "Is Null" is not working with the "Text Area" type of field.

So what I am trying to do is make the Description Part Overwrite field required if the Parts Branch is 102-EquipmentMorris-SUP.

Below is the Validation I tried but does not seem to work.

Thanks for your time,

0 Likes
Reply

Re: Can I make a field required based on dependency of another field?

Jump to solution

David,

Apologies for the delayed response. ISNULL should be supported for text area fields so I'm not sure why your rule isn't working. Can you double-check that the validation rule is associated with the SFM in question? It's possible to have a validation rule which isn't associated with the SFM where you want it to be enforced (in this manner, the same rule can be applied to multiple SFMs). Edit the SFM (not the validation rule) where you want to enforce requiredness and navigate to the 'Data Validation Rules' tab. In the top list on that tab, you'll see 'available' rules and in the bottom list you'll see any rules already associated with the SFM. If the rule in question doesn't appear in the bottom list, you'll need to move it from the top list by either dragging and dropping (depending on your version of SVMX) or using the 'Add Rule to Process' link.

If that doesn't address the issue, it may be best to log a case so our support team can provide some hands-on assistance.

Regards,

Chris