Let’s say that you are writing a flow and at one point you are going to prompt your user for some data that will then be used to populate a dynamic choice field.
Tell me hot shot, how do you handle just one single record?Do you make your user select one and then click through, or is there a better way?
“Can I choose not to do Matrix 2 and 3?”
Well, the good news is, you can make a smarter dynamic choice flow. By using some logic and a couple queries, you can choose to display the dynamic choice or bypass it. The reason we can do this is because instead of checking to see how many records are returned, we are just going to check to see if there is more than one.
The example I am going to use takes a user input of “Last Name” and will check to see if there is ONE or ONE+ records and then determines if the user should see the dynamic choice page or a generic page displayed to the user.
1) Query1 is based on the user input. ID of the first record is passed to a variable (VarID1)
2) Query2 is based on the user input AND the ID cannot equal VARID1
3) The results of Query2 is passed to a variable (VarID2). This variable has a default value of zero
4) Decision point evaluates VarID2 and if the variable DOES NOT equal zero, the dynamic choice screen is presented. Default outcome (in this case) is just a display screen.
5) Take the rest of the day off (just kidding)
I wish there was more to this, but it really is just a nice piece of logic and the fact that your user doesn’t have a click gate if there is just one record returned will probably go unnoticed, but you will know the truth!
EDIT! This blog post really covered this on a high level. If you want a blow by blow account, head over to my buddy Rakesh’s blog…
One thought on “Making a Dynamic Choice That Much Better”