Making a Dynamic Choice That Much Better

Standard

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?

Image “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.

Image

 

1)      Query1 is based on the user input. ID of the first record is passed to a variable (VarID1)

Image

2)      Query2 is based on the user input AND the ID cannot equal VARID1
Image

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.

Image

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…

 

Advertisements

One thought on “Making a Dynamic Choice That Much Better

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s