Just one more thing. In the Trial called "Pediatrics – Sacramento, Phoenix, Charlotte", the result shows up 3 times. Same for all of the trials with multiple locations.
Option 1:
Is there a way to only have it show up once?
Option 2:
Can I have the RFG custom field='city-state-additional-locations' show up in the loop? I tried to add it but it didn't show up.
The reason why you are seeing the item "Pediatrics – Sacramento, Phoenix, Charlotte" three times because your view is set to query the repeating field group.
=> hidden link
If you check your post "Pediatrics – Sacramento, Phoenix, Charlotte", it has three repeating field group items. That is why you see the "Pediatrics – Sacramento, Phoenix, Charlotte" three times. hidden link
So, If I understand correctly, you want to do search in repeating field groups address field and want to display related parents?
Yes, Pediatrics has 3 entries in the RFG (locations). But in the results, I only want it to show up once. There may be times where I have 150 locations, i don't want the post Pediatrics to show up 150 times. Is it possible to query the RFG but then just show the parent post once?
Thank you for the snippet of code. I see that each trial only appears once now. However, now it is not using all of the RFG locations in the search. It is only pulling up one of the locations per trial.
eg. Pediatrics has 3 locations in the RFG: Sacramento, Phoenix, Charlotte. Only Charlotte is showing up.
Can you have all locations in RFG included in the search?
As the view is set to query RFG and you said you want to group by parent post, so when you group by parent post it will only display one entry.
If you want to display the RFG entries then all RFG entry will be displayed with duplicate parent as all RFG item for single post holds the same parent.
Like this post: hidden link
- It has 3 RFG items.
So, the possibility will be either you can list all 3 RFG items with associated parent (which will be the same for all 3 RFG item).
I've disabled the code I've added to group post by the parent.
To this view:
=> hidden link
To display the RFT fields, I've added the filed as given under to the content template at the bottom of the content template, you can adjust its position as required.
I implemented your fix onto the live site and it worked great. But had 2 other issues come up.
1) Filter (Screenshot: Query FIlter):
I tried to implement the same search feature onto another view (Search Healthy Volunteers with RFG Locations ID: 18750) but it broke because I had a Query Filter applied to that view. How do i apply a filter to this view?
Here is the broken view. hidden link
2) Deleting entry in RFG (Screenshot: Delete RFG Data):
Another issue i had was that when I deleted a trial, the repeatable field group location did not delete. I found a way around it by deleting each RFG in the trial before deleting the trial. Is there another way to do this? I may have some trials with 150 RFG locations.
Here is the page with the deleted trials. hidden link
I updated your user and pw.
USER:
Guest
PASSWORD:
c1)M7(%2HtTLtA#i#FWh@$HW
thanks.
New threads created by Minesh and linked to this one are listed below: