I want to have a dynamic flow screen component where I can define what input it wants during the flow such as Text, Number, Date, DateTime etc. is this possible?
2 Answers
None of the out-of-the-box Flow Screen Input components will do this as described.
As of today, I think you have two general options:
Place one of each type of input on the screen, using conditional visibility rules to display just the one you want.
Build/Develop a custom Flow Screen component that more-or-less exposes the
lightning:input
component to Flow Screens, passing configuration values that determine the data type.
More info on Conditional Visibility in Flows: https://help.salesforce.com/articleView?id=sf.flow_ref_elements_screen_conditional_visibility.htm&type=5
-
1Looks like I'll have to go down the lightning input route as the main issue is I want to have 5 fields per page so 5*types of data fields required would just be a mess to make. Commented Mar 25, 2021 at 17:25
You should consider the Lightning Input component from UnofficialSF.com, which has a number of input formats: https://unofficialsf.com/lightninginput/
-
Welcome to Salesforce Stack Exchange (SFSE). Thanks for contributing. Be sure to take the SFSE Tour & look around the Help Center to determine more ways to contribute.– MoonpieCommented Aug 27, 2021 at 13:30