0

I have a simple flow screen where I want a user to EITHER select a contact from a radio button record choice set, OR create a new contact by filling in a name, email, and phone screen component.

I can't figure out how to make this an OR requirement - e.g. they either need to do one or the other but they shouldn't do both and it is mandatory. Also, it looks like the Name component doesn't even have a required attribute. What's the best way to achieve this functionality? Thanks in advance.

0

Conditional Visibility

You could have a radio button group to control the visibility of the other input components (by setting up conditional visibility on them). The options for this radio group would be:

  • Create New Contact
  • Select Existing Contact

You could select one option by default to minimise the number of clicks for users.

Making Name Required

You're correct in that it doesn't look like the Name input component can be made required.

Instead, you could use multiple Text input components to capture the name - each of those could be made required.

  • Thanks for the response! Question though. I would still have to make all of these fields required to make sure the contact selection or new contact fields were filled in. If one choice was hidden but still required, wouldn't it prevent user from progressing in the flow? – jameskbw Nov 21 '19 at 15:20
  • Good question, no. "Screen input components hidden by conditional visibility are not required when a user runs the flow, even if Required is set to {!$GlobalConstant.True}. Once the component appears to the user, it is treated as required.": help.salesforce.com/… – M H Nov 22 '19 at 9:46
  • Awesome, I got it working. Thank you. I should note that the component visibility seems fairly buggy. It didn't work / evaluate correctly when I used true as the record choice value and it doesn't work when you evaluate the actual record choice. I had to evaluate the radio button screen component and use "new" and "existing" for the record choice values. – jameskbw Nov 22 '19 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.