Virtual Agent Reference Choice user input control - How to add a ' None of the Above' option

Paul Curwen
Giga Sage

Has anyone ever tried to add a 'None of the Above' option to the Virtual Agent Reference Choice user input control. We are showing the user a list of applications (from cmdb_ci_appl) based on a search term they have just used and ideally need a 'None of the Above' option to allow them to progress without selecting an application.

***If Correct/Helpful please take time mark as Correct/Helpful. It is much appreciated.***

Regards

Paul
5 REPLIES 5

Chris D
Kilo Sage
Kilo Sage

Yes, very doable but only with a script. I think that this should be a simple OOTB option personally, but luckily it's not too difficult to setup so it's not a big deal. And a bonus if you do a script instead of condition builder, you can easily order the results by name alphabetically (by default they're by sys_id alphabetically... -_-)

It'll look like:

    //normal options array creation, gliderecord query, and populating the array
    while(gr.next()) {
        options.push({ 'value': gr.getUniqueValue(), 'label': gr.getDisplayValue('u_packagename') });
    }
    
    //additional option added to the end
    options.push({ 'value': 'other', 'label': 'Other' });


    //show results to user
    return options;

After this, if desired, you can do a simple decision block to check if the value  = "other" or != "other" if you have dependency on this.

Many thanks I'll give this ago.

***If Correct/Helpful please take time mark as Correct/Helpful. It is much appreciated.***

Regards

Paul

I was able to use Chris' method successfully.

I agree that there should be a simple way to add a cancel, none, or other option built in to the UI.

I submitted this as an Idea on the Community page

Add Options to VA Designer Reference Choice

 

Nathan Okh
Mega Sage

Personally, I couldn't get this to work... trying to get the output to look something like this.

Anyone find an answer they are willing to share.

find_real_file.png

 

I might just do a descision tree version, but it would be nice to have this choice and return it...