Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

stopping repeating fields in pop up box?

Featured Replies

Hi Everyone,

I have a pop up box that displays the values from the Customer field in my DB. This all works great, however some of the Customer names are the same (i.e x3 MrCustomer) in my DB and therefore display more than once in my pop up box.

Is there anyway to stop Customer names that are the same from appearing in the pop up box more than once?

Many thanks

what do ou mean by pop up box?

value lists from a field or related field should display customer names just once.

you should post your code....I think Bunny is talking about "removing duplicates"

"...some of the Customer names are the same (i.e x3 MrCustomer)..."

Yes it is interesting. We don't know whom she really wants to display in her drop-down.

Why are there 3 "MrCustomer"'s? Is this because of duplicate records or the failure to distinguish between "MrACustomer", "MrLCustomer", and "MrWCustomer" - who may or may not be related.

And what about discerning between Neil Simon the economist, Neil Simon the song writer and Neil Simon Senator? How does one field do that? Or do you put up a message to the customer when they register, "Sorry, but your name must be unique, and it isn't."

"...I think Bunny is talking about "removing duplicates""

If the problem is duplicate records, the best solution is good design which will not allow duplicate records to be created.

And why a "customer" drop-down? Shall we imagine the excitement such a drop-down will provide to a customer as they try to find their name from an ever-growing drop-down of customers - ten, a hundred, a thousand.

No, don't post your code - speculaiton is a lot more fun.

" speculaiton is a lot more fun "

I wonder how big the drop-down can get?!

Can a human scroll for that long?!

Maybe a new job opportunity for a "scroller" position?!

...Bunny could be onto something here....

Bunny Bunny Bunny....your name is just asking for it! laugh.gif

NHF

A "pop-up list" is better for large numbers of entries: the user can use the keyboard to select the name my typing the first few letters.

Vaughan, your response piqued my interest so I tried this in NN using a db file with 5000 records. The list itself is arrived at from a sorted findall. In order to display a sorted list of 5000 names I used as part of a form action with a -find:

<select name="myfield">

[FMP-Record]

<option value="[FMP-Field:myfield]">[FMP-Field:myfield]</option>

[/FMP-Record]

</select>

When I typed one letter it took me to the first name in the list under that letter. If I typed a second letter the list jumped to the first name in the list under that letter. So in NN one can type only one letter. This is fine, but with 5000 records, if I type in "S" I still need to find the one record from among over 600. Not so easy.

Another issue is the load time for this list of 5000 names (records) to appear took on average 15 seconds. And I tested this with just one client (no load on the system).

drop-down is good for some "category-like" list that narrows it down-where you have 10-20 even 50 records....but beynd that....might as well buy some pigeons and send them out with invoice recorods smile.gif

Typing a starting letter of 'words' in drop-down narrows it down to a starting point(typed letter)......user still has to scroll past that starting point. If user clicks somewhere on a page in this process ... user is back to zero.

IF you must use something like this in form I would suggest a List that is more forgiving to naviagtion:

<form name="form1" method="post" action="">

<select name="select" size="5">

<option value="1">1</option>

<option value="2">2</option>

<option value="3">3</option>

<option value="4">4</option>

<option value="5">5</option>

<option value="6">6</option>

<option value="7">7</option>

<option value="8">8</option>

<option value="9">9</option>

<option value="10">10</option>

<option value="11">11</option>

</select>

</form>

now....what was the point of all this..... laugh.gif

  • Author

Hi Everyone,

I think you are right, duplication is the word I am looking for!

I have a Contacts DB that contains about 100 records, however some of these records may be for the same customer as our customers may have more than one site. Each customer and site has a unique Contact ID.

Example records:

Customer: CustomerLtd

Site: London

Contact ID: 1

Customer: CustomerLtd

Site: New York

Contact ID: 2

My web page has a pop up/drop down box that contains all the Customer names as pulled from the Contacts DB. The problem I am having is that it will find two 'CustomerLtd' but I only want it to display one!

I have a blank page before this (that the user does not see) which populates the drop down box.

Blank page:

<META HTTP-EQUIV="refresh" CONTENT="1;URL=FMPro?-DB=CONTACTS.fp5&-Format=selectcustomer.htm&-sortfield=Customer&-sortorder=ascend&-Max=All&-Find">

selectcustomer.htm:

<TR>

<TD WIDTH=100% ALIGN=CENTER>

<SELECT NAME=Customer>

[FMP-Record]

<OPTION VALUE="[FMP-Field: Customer]">[FMP-Field: Customer]</OPTION>

[/FMP-Record]

</SELECT>

</TD>

</TR>

After the Customer name is selected the user then proceeds to next page with a drop down box that displays all sites related to that customer. This narrows my search further to eventually displays the results for a chosen Customer and their chosen Site.

I did think of hard coding the Customer drop down box but this would require maintenance every time a new record was added to the DB.

All help greatly appreiciated, i'm really stuck on this one!

"I did think of hard coding the Customer drop down box but this would require maintenance every time a new record was added to the DB."

not necessarily....File-->Define Value List--(edit or new)--> Use values from field

As Leb said create a ValueList for Customer. Then look at using the [FMP-ValueList] tags.

Good Luck.

Garry

  • Author

Thank you very much, that worked a treat!

Here is the code I used if anyone else has had a similar problem:

<select name="Customer">

<OPTION>--Select Customer--

[FMP-ValueList: Customer, List=Customer List]

<OPTION value="[FMP-ValueListItem]" [FMP-ValueListChecked]>[FMP-ValueListItem]

[/FMP-ValueList]

</select>

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.