Reset field possible?

  • 5 November 2014
  • 3 replies
  • 7 views

Badge +8

Hi,

I am working with Nintex Forms 2013 but am wondering if the following is possible.

I have a Nintex form that is used to request a project site. When a site is requested they have to fill in to which the customer the project belongs to. If the customer is not available in the (lookup) list they should have the possibility to check a checkbox and fill in the name of the customer manually. My Nintex Workflow is doing the rest :-).

More details on lists:

  • I have a list "Project sites" - using the Nintex form to request a project site

  • I have a list "Customers" - this includes a list of customers that already have a project site assigned to them
  • A lookup colum to the Customers list is taking care of selecting the customer in my request form

More details on form:

  • Lookup column "Customers" available - a user selects here the customer it belongs to
  • A checkbox that they should mark when the customer they are looking for is not yet in the list
    • When a user selects the checkbox my Customers control is being disabled using a formatting rule = OK
    • When a user selects the checkbox a single line of text field is shown where they manually have to fill in the name of the customer = OK using a formatting rule
  • It is required to select the customer from the list OR fill in the other field manually. Problem is that when one fills in the field manually (and thus has checked the checkbox) the customer field should be resetted so that no value is filled in here as I do not want to save wrong information in my list. Would this be possible using Javascript?

Thank you!

Glenda


3 replies

Userlevel 7
Badge +17

I'm sure you could do it with JavaScript, but it may be easier to let the workflow do it. You could have the first actions be to check if the NewCustomer text box was filled out, if it is, then update the lookup field with this value. You can accomplish this by retrieving the Form Data for the named control, or, more simply, create a list field to store NewCustomer in and use this list field. The list field will be blank part of the time, and with it hidden from view on the list and other forms, then it would be fine.

Badge +8

Andrew,

Thanks for your response. I thought it through a few more times and changed my set-up. My workflow will fill in my Customer so it will always be the correct one in the list.

Next to this:

Had some problems to retrieve the URL of a certain customer from my customers list (site URL is a field, type hyperlink). As I seemed to be comparing a "Customer Name" lookup field to the customers list with a "Customer Name" single line of text field of my customers list, my URL remained empty. I now solved it by storing the Customer Name lookup field in a single line of text variable and use this variable for the comparison. Works fine, but isn't there an easier way?

Next to this, I stored my customer site URL in a single line of text variable. As the site URL originally has the "hyperlink" type the URL is stored as followed in my variable: "site URL, site URL". For the use of this URL in for example messages, this format is not OK. I now split on the ", " using a regular expression and put the values in a collection variable. Next to this I deleted doubles from my collection variable with a collection operation action.

Would there maybe be an easier way here to solve this? :-)

Userlevel 7
Badge +17

Is the Site URL field in the same source list as the Customer data? If so, and you are trying to bring in this information along with the Customer Name when selected, add it as a reference field in your Projects list.

  • Go to projects list settings
  • select the Customer Name lookup field to edit its settings
  • Where you reference Customer Name to bring in, you should see all other fields in the Customers list, selected Site URL to come over as well. This will create a second "lookup" field as a read only field. When you select a customer through the lookup drop down, it will auto bring in the Site URL.

Please let me know if I misunderstood your list setup. Maybe describe your lists and what field is on what list if I got it wrong.

Reply