All, In a visualworkflow I've created, I ask the user for name, contact info, etc. for persons we are serving and the flow creates new contacts, accounts, and another custom object, as appropriate based on the info the user enters. Before the flow creates the new records, the flow checks for duplicates. The dynamic record choice is a list of possible duplicates (e.g., contacts that have the same last name and bday as the one the user is trying to create). I show these possible duplicates to the user as radio buttons based on the dynamic record choice so the user can select if there contact is already in the database, and then the flow acts accordingly.

I would like to skip the flow screen if no possible duplicates are found (if the dynamic record choice is empty/null). Can anyone provide guidance on how to use a decision element to check if the dynamic record choice is empty/blank? I've been unable to make this work. I've tried using a decision element with the criteria dynamicrecordchoice is null, but the flow won't save with this criteria (says its not valid for a dynamic record choice). Other ideas?

Thanks, Collen

  • if you provide some code with a sample scenario that will be good for other members to understand and respond your question. – Santanu Boral Jun 20 '17 at 4:34
  • Can you document what you have tried that has not worked? For fast lookups, in decision elements I simply use global variable true / false as the value to compare the lookup itself to. Believe that would work w dynamic choice as well but would need to test. – gorav Jun 20 '17 at 10:58
  • Thanks all. I've edited my response above to provide a bit more detail. gorav, I'm interested in your idea, but if its using "isnull" then I've already tried that without any luck. – cmayer10 Jun 20 '17 at 18:32

I found a way to do this (Not sure if it's still needed, but might help someone).

On the Contact object, put a Formula field (Number type, with no decimal place), with a value of "1". I called this field "Always_1__c".

In the flow, create a Number Variable (called "CheckIf1VAR", or whatever you like), with the scale set to "0". Then, in the flow screen where the Dynamic Record choice for Contacts is (I was using a multi-select picklist), edit the dynamic record choice as follows: in the "Additional Information" section at the bottom, set the field "Always_1__c" to variable "CheckIf1VAR".

Next, after the screen, set up a Decision with the following criteria: The Resource is "CheckIf1VAR", the Operator is "Equals" and the Value is "1". Now, if you chose a value in you multi-select field, it will pass through this Outcome. If you did not select a value from your multi-select, it will pass through the Default Outcome (and in your case, you can skip the flow screen).

The reason behind it is, no matter how many options you select, dynamic record choices only stores one record value in the variable - the CheckIf1VAR in our case (this value is the last value you select in the multi-select, I believe). So, if you choose one, or many values, the "Always_1__c" field passes in the value of "1" to the flow variable "CheckIf1VAR". If you do not select a value from the multi-select field, no value is passed in the "CheckIf1VAR" variable, and so it will not equal "1"; therefore, it will go through the Default Outcome of the decision.

There could be other ways to achieve this, but it works for me.

Let me know if anything is unclear.

Best of luck.

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.