Jump to content
  • 0

Results returning duplicate values


Dawana
 Share

Question

Greetings,

I have a data set with a store with many locations

Search form
store name
manager name


Store A = 1 manager
Store B = 1 manager
Store C = multiple managers

for example

-CORRECT

Store A
123 Somewhere Ave.
wish, RR 80012
manager: Popicle Pop

- CORRECT

Store B
456 Summer Time
Hopefully, DD 80014
Manager: Groovy Man

 

The Problem:
When I select Store C
The results return all the stores assigned to Store C with manager names, however the stores name and address  are duplicated, the manager names are unique.

Store C - (results returned)
788 Okaywhereissummer Rd
AwwwMan, FF 80022
Manager: Boogie Wonderland

Store C
788 Okaywhereissummer Rd
AwwwMan, FF 80022
manager: Popicle Pop

Store C
788 Okaywhereissummer Rd
AwwwMan, FF 80022
Manager: Lucy Lunchmeat

Store C
788 HereIam Rd
AwwwMan, FF 80022
Manager: Dolly DoorKnob

Store C
788 HereIam Rd
AwwwMan, FF 80022
Manager: Kick Rocks

Store c
788 HereIam Rd
AwwwMan, FF 80022
manager: Popicle Pop


***The goal:
I would like the results to return unique store locations, (so that means all the managers associated to that one store are displayed),  and create a link
the user will click on and route to the details page, this page will display a snippet of information pertaining to each manager at that store. (see below)


Store C
788 Okaywhereissummer Rd
AwwwMan, FF 80022
(link > click to details page with snippets of information of the managers associated to this location only)
Manager: Lucy Lunchmeat
Manager: Boogie Wonderland
manager: Popicle Pop

Store C
788 HereIam Rd
AwwwMan, FF 80022
(link > click to details page with snippets of information of the managers associated to this location only)
Manager: Dolly DoorKnob
Manager: Kick Rocks
manager: Popicle Pop

I also need to be able to search on the manager name individually, this result set would return all the stores the manager is assigned to  and create a link
to the details page that will display a snippet of information pertaining to manager selected.

Select manager > Popicle Pops

Store C
788 HereIam Rd
AwwwMan, FF 80022

(Name: Popicle Pops Link)

Store C
788 Okaywhereissummer Rd
AwwwMan, FF 80022

(Name: Popicle Pops Link)

 
Whew!

Is this possible?  I have researched JavaScript (case - switch ) ,  which I think can be a option, only I don't know where to begin.  I'm stuck.   Help !!  Ideas, Any suggestions on how to achieve this complex search form is greatly appreciated.  Hopefully, it's a simple solution. :)

Thanks

Dawana

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

You have a many to many relationship here -- many managers can be associated to many locations -- so you might want to start with normalizing your tables.

2019-04-16_16-04-18.png.1f45f5313a4a283ef628ce16cc4a5125.png

You could then:

(1) Query the location table for the location-specific search. to show all the locations with a link to each location's detail page (1 search DataPage).

(2) Display the details of a location with all associated managers (two DataPages, leveraging the parent-child relationship and embedded into a single web page)

(3) Display the details of a manager with all associated locations (another two DataPages, leveraging the parent-child relationship from the opposite direct and embedded into a single web page)

https://howto.caspio.com/tech-tips-and-articles/tech-parameters/how-to-create-a-one-to-many-relational-datapage/

~~~~~~~

There might be a less DataPage-heavy solution to do what you want, perhaps others have such ideas. :0)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...