2 Replies Latest reply on Sep 23, 2016 6:51 AM by Dobieg5750

    Limiting Records Based on Value List Data (Multiple Entries)


      So I've spent considerable time trying a few different routes to sole a problem and with no luck I figured I'd try the discussion forums...so here goes...


      I have two tables...a Dashboard Table and a Data Table.


      In the Data Table there is a field that defines the record in groups...Group A, Group B, Group C, etc.


      You can choose which group when you are adding records via a dropdown that refers to a Value List which defined Group A, Group B, etc.


      So all the records have one of these groups assigned to it.


      Now, the Dashboard serves as a way to limit the records via a portal on the dashboard...and a relationship that says "only show the records (in Data Table) where the Group Field matches the "Selection Field" on the Dashboard.


      The "Selection Field" is actually a checkbox set where the value list for it is based on the same value list that has Group A, Group B, Group C, etc. and I use checkbox because sometimes you want to view in the portal not just Group A but maybe Group A AND Group B...or all of them.


      This works quite well because the "Selection Field" is basically a Global Field and even with multiple values checked, the portal relationship works great.


      The Problem comes in when I try to create a Report (i.e. a new layout) and try to limit the records in the same fashion. I can get it to limit the records via script (Perform Find) when I only have ONE entry in my Selection Field...but when I have two...or more...the script can't find a match.


      I don't want to show all the records...only the ones that match the selected criteria on my dashboard...I've messed with self-joins and that doesn't seem to work...and really what I'm looking for is a script to say "pull only the records that match ANY of the multiple criteria that is on my dashboard field"...I've tried pulling that dashboard global and placing it in a $$variable to use in the Perform Find script...but it only lets me exact match (==) or match the first word, etc.





        • 1. Re: Limiting Records Based on Value List Data (Multiple Entries)

          Given that your check box formatted field is a match field in the portal's relationship, the simplest solution is to use Go To Related records. This can be used to pull up the desired found set on your report layout all in one step.


          It is possible to set up a script to find the same records but it's a much more complex process. Your script would loop through the selected values and either create a different find request for each value before performing a find or it would find records for the first selected value and then use extend found set to find the other selected values. None of that should be necessary here, however.

          • 2. Re: Limiting Records Based on Value List Data (Multiple Entries)

            Thanks for the confidence to go back to GTRR...I had tried it unsuccessfully a few times but after trying again and being a little patient, it finally kicked in and seems to be working as intended.