Data from Entries… Or

I would like to create a data from entries for a “Company Name” field to lookup and see if there are existing records for this company.  And mainly so the same company is not put in twice.

However, if I use the Data From Entries field type and the company is truly new, (not on the dropdown list), there is not a place to put the “Company Name”

Is there a way to allow manual entry OR a selection from the list ?

 

 

Roy,

I'm going to take a stab here and say something you probably already know.

 

The dropdown is reading the data from a separate table.field list which is read only in the context of the dropdown field.

A solution might be to have a hyperlink next to the box asking the user to 'click here'.  This takes them to another form that allows addition of the new value.  Save, close this second form and come back to main form.  Then of course you must refresh this form to pick up the new values in the dropdown.

Any current form data may be lost causing a less than perfect experience for the user.  It would be neat id you could initiate a refresh of the dropdown listbox on its own.

 

Another solution??? Have 'other' as one of your dropdown options then set a hidden field to  become visible  when this choice is selected.   You can then handle this in the data end not the front end.

 

Regards,

John.

One way to set this up would be to follow these steps:

Create single line text field named "Company Name". In the field options for this field set the "unique" checkbox to prevent the same value from being added twice. (see screenshot 1)

Go to the entries page and add a new Entry for each of the Companies you want displayed in your drop-down list Also add an "Other" entry. So now you should have entries with company 1, company 2, company 3,..., and other saved to the "Company Name field".

Now go back to your form and add a Data From Entries Field and pull data from your "Company Name" field from the same form. After saving your form, all your entered company names and "other" should be displayed in the drop-down field. (screenshot 2)

Finally, go back to your "Company Name" text field, and add a conditional statement that shows this text field if your data from entries field is equal to "other". (screenshot 3)

There are a few caveats or things you should know about setting things up like this:
-Every company entered into the Company Name text field will be added to the drop-down field but
only unique Company Names will be accepted (This includes typos or misspellings).

-If "Other" is selected in the drop-down list, the actual company name saved with the entry will be in the text field and "other" will be saved in the drop-down field(screenshot 4)...Just keep this in mind if you are using a Custom display to display the company name. If you only use the Data From Entries field ID, some displayed entries will show "Other" rather than the Company name manually entered. (There is logic to resolve this but that's another topic).


Attachments:
Screen Shot 2012-09-15 at 9.53.56 AMScreen Shot 2012-09-15 at 10.00.47 AMScreen Shot 2012-09-15 at 10.04.33 AMScreen Shot 2012-09-15 at 9.48.16 AM

Topic closed.