cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

How do I filter the values in a choice column with nintex forms 2013?

Jump to solution

Hey Everyone!

I am new to nintex forms and the forums so thank you in your advance for your patience.

I am currently struggling with what I hope is a simple requirement so I am turning to you for help.  I have a list with a choice column.  I have added that choice column to my nintex form and I need a way to limit the values that appear from that column on the form.  I have seen all kinds of posts about doing this with lookup columns and what not but all I need is a way to filter out existing values.

For example: My choice column is called "Fruit" and it contains values for apple, banana, pear and orange.  Even though all 4 of those values exist in the underlying sharepoint column I need to expose ONLY a few of them.  How do I format the filtering section of the nintex form control to expose only apple and orange?

At present all my meddling has resulting in showing everything...or nothing.

You help is greatly appreciated.

Yours Truly,

A Noob

Labels: (2)
Tags (1)
Reply
8 Replies
Chris_Ben
Nintex Newbie

Re: How do I filter the values in a choice column with nintex forms 2013?

Jump to solution

Hi Matthew,

What condition makes the list change?  I've got a solution but not sure it fits in with your request.  I'll try anyway ;-)

Let's say you have your list of fruit but those options change depending on the meal.  e.g. Apple appears for breakfast and lunch but not for dinner.  Banana appears for lunch only etc.  So when you change the meal the fruit choices change:

Capture1.JPG

Capture2.JPG

If that's what you want, follow the instructions below.  If it isn't let us know and we'll find a method for you.

Create a "Fruit list".  It's got two columns - the first column has the fruit the second column is a choice column using checkboxes and that's got the meals.

Capture3.JPG

Capture4.JPG

Populate that list.  Mine looks like this:

Capture5.JPG

Create another list.  I've called mine Menu.

  • Add a Meal column.  There are a few ways to do this but the fastest is to add a choice column called "Meal" and manually enter the options Breakfast, Lunch and Dinner.  You could make this more dynamic by using a lookup field if you want.
  • Add  a fruit column.  Make it a lookup column which refers back to the fruit list you made earlier.  The column it should reference is the fruit column:

Capture6.JPG

Capture7.JPG

Now you're ready to rock 'n roll.  Go and open up the forms designer and double click on the Fruit control.  Go and change the filtering options to what is shown below.

Capture8.JPG

All I'm doing here is looking at the meal field, seeing what the value is and filtering the fruit field to only show fruit specified for that meal.

Hope this helps - I've typed this response in a bit of a hurry so let us know if you have any questions.

Cheers,

Chris

Reply
Not applicable

Re: How do I filter the values in a choice column with nintex forms 2013?

Jump to solution

Hey Chris,

I'm afraid that isn't exactly what I am looking for.  In my case I only have a single column that I need to filter.  I don't need that filtering to be conditional upon another column.

The reason is that I have multiple values in my choice list that are no longer available for selection...but if I delete (or rename) those values it has an effect on the list items that existed previously.  What I am looking for is a way to hide those values in the dropdown.

Matthew

0 Kudos
Reply
jackgelo
Nintex Newbie

Re: How do I filter the values in a choice column with nintex forms 2013?

Jump to solution

Hi Matthew,

In your SharePoint list of options, you can add a checkbox column to mark the item as active or not, you can set the lookup control as in Chris' screenshot, but instead of selecting "By a control's value" you can use "By a specific value" (or something similar...) where you can set a static filter in order to show only items with the checkbox checked.

Giacomo

0 Kudos
Reply
Not applicable

Re: How do I filter the values in a choice column with nintex forms 2013?

Jump to solution

Thank you for the response and I'm sorry if I have been unclear.  I need only filter out existing values of a single choice column.  In this circumstance I can not add additional columns to the list to filter by.  I have done this with jQuery in the past via sharepoint designer on the form with a script like the one shown below but I am hoping there is a more convinient way to do this via nintex forms:

<script language="javascript" type="text/javascript">

$(document).ready( function() {

$(":input[title='Project Type']").find("option[value='9']").remove();

$(":input[title='Project Type']").find("option[value='10']").remove();

});

</script>

0 Kudos
Reply
Chris_Ben
Nintex Newbie

Re: How do I filter the values in a choice column with nintex forms 2013?

Jump to solution

Hi Matthew,

I'm not aware of any native Nintex Forms functionality that will all you to programmatically remove items.  You could possibly use jQuery as per your example above.  There are lots of articles on using jQuery and Forms on this site.

I'm still trying to figure out how the drop down field knows which items to hide/show.  It must be on a condition somewhere right?  If it is on a condition and you can derive that programmatically then we still might have a method.  Instead of filtering by another control, you can filter by a specified value.  Then you could write the formula to derive that value or use a hidden calculated value.

Cheers,

Chris

Reply
Not applicable

Re: How do I filter the values in a choice column with nintex forms 2013?

Jump to solution

I am looking for a way to remove values that contain Inactive in the Title.  This jquery works with SharePoint forms but not Nintex.  I've been trying to convert it to Nintex but have yet to get the syntax down.

$("select[title='Status']").find('option:contains("InActive")').remove();

The problem I have found using the Nintex filter in the Control Settings is that regardless of how you apply it, it is applied to both in New and Edit Mode.  So if a user submits a request with a value of ABC in the field and I make that option Inactive it breaks the Edit form for that request.  You will get an error because that value is no longer listed.

If you found a workaround or reliable solution please post.

I would think Nintex could add this option to the Control Settings.  Or improve the current Filtering so the Edit form doesn't break when a choice is no longer an option but was selected previously.

0 Kudos
Reply
nico1
Nintex Newbie

Re: How do I filter the values in a choice column with nintex forms 2013?

Jump to solution

Hi Giacomo!

Picking up from your answer. I was trying to apply the same principle but Im struggling to use the correct filter. I'm doing something like "Active" column on my lookup list, so for each item I want to display (equivalent to the "Fruits" on this thread) I have a "Yes/No" value (Just as you suggested I think). I would like to display only those with the "Yes" value on them. I set up the Control's filtering section as:

  • Filter available selections: By a specified value;
  • Where field: Active == "Yes"
  • Filtered by value: Active
  • Action when no filter applied: Show none

    Any suggestions?
0 Kudos
Reply
Catharine
Nintex Newbie

Re: How do I filter the values in a choice column with nintex forms 2013?

Jump to solution

Hi - I have used your solution to create a multi select Lookup form control where the options available depend on who has opened the form.  Thank you so much for the post.

 

I now have a form control that has the correct options displayed in it, and the users can select a subset of those.  How do I now write that information back to the Choice control I have in my SharePoint list (which contains all the valid options) ?  When I try and connect my Lookup control to a field in the list I am only offered Single line text fields.

 

 

 

 

0 Kudos
Reply