bimi82
Workflow Hero

Hide certain data from a drop-down choice field - is this possible?

Jump to solution

Hello

 

I have a choice drop-down field with a lot of options to select from.
The question is, is it possible to hide certain options based on if status = "xyz"


Example:

Duplicate
Reviewed
Accepted
Assigned

 

I like to hide Accepted and Assigned as soon as Status is not in "pending" anymore.

Maybe this is possible via the $ and css

 

Would appreciate your assistance.

0 Kudos
Reply
4 Replies
kunalpatel
Automation Master
Automation Master

Re: Hide certain data from a drop-down choice field - is this possible?

Jump to solution

@bimi82 ......how about using lookup list control?

0 Kudos
Reply
bimi82
Workflow Hero

Re: Hide certain data from a drop-down choice field - is this possible?

Jump to solution

@kunalpatel 

 

I know that option but I cannot use it as it's too late!

I already got over 100 items with the current process and cannot change it to lookup control ... it would require manual update of all data etc,.

 

I am sure there is somebody out there who can assist using NWF$ and .css to make it happen.

An example is like this page but needs some tweaks to make it work?

0 Kudos
Reply
bimi82
Workflow Hero

Re: Hide certain data from a drop-down choice field - is this possible?

Jump to solution

To explain this further:

 

There is a calculated value named varConcept and may contain values such as Pending, In Review, Accepted, In Work.

 

There is a dropdown menu named varConcept which holds following options: Updated, Reviewed, Already Implemented, Duplicate, Assigned and the idea behind all this is to make a script that checks the varStatus and shows relevant options in the dropdown varConcept.

 

In simple context:

 

IF varStatus contains "Pending" then show varConcept options Updated and Duplicate
IF varStatus contains "In Review" then show varConcept options Reviewed and Already Implemented
IF varStatus contains "Accepted" then show varConcept options Assigned else hide everything
ELSE hide everything

 

 

0 Kudos
Reply
bimi82
Workflow Hero

Re: Hide certain data from a drop-down choice field - is this possible?

Jump to solution

After so many trial and errors I got it working:

 

NWF$(document).ready(function() { 
   if (NWF$('#' + varStatus).val() == 'Pending' )
    {
      NWF$("#"+ varConcept).find("option[value='Pending']").remove();
      NWF$("#"+ varConcept).find("option[value='Reviewed']").remove();      
    }
   if (NWF$('#' + varStatus).val() == 'In Review' )
    {
      NWF$("#"+ varConcept).find("option[value='Pending']").remove();
      NWF$("#"+ varConcept).find("option[value='Updated']").remove();
       }
});

View solution in original post

0 Kudos
Reply