Slater Posted February 12, 2009 Posted February 12, 2009 Hi, I've got a list that describes all the people who have a picture PEOPLE::THEIR_PICS = List (PICTURES::IDPicture) Which returns something like: 1 3 5 44 361 etc I'm trying to isolate the nth item, so that i can use that value in a relationship's portal, ie PEOPLE::View_Pics = 5 (3rd value) and then in the relationship: PEOPLE::IDPerson = PICTURE::IDPerson AND PEOPLE::View_Pics >= PICTURE::IDPicture which then shows pictures from the 3rd value upwards (if PEOPLE::View_Pics = 5) The reason that i want to do this is that i'm creating a horizontal portal made out of multiple portals that start at row numbers 1, 4, 7 etc and i'm getting a button to go up and down the values in the list (from multuiple threads here on FMF) Could someone point me in the right direction? Many thanks, Slater
bcooney Posted February 12, 2009 Posted February 12, 2009 Why doesn't creating horizontal portals based on a relationship that matches __kP_PeopleID to _kF_PeopleID and that start at 1, 4, 7 (to show only 3 rows in each portal) work on its own? I'm not sure what the List() and trying to isolate the nth item is doing for you.
Slater Posted February 12, 2009 Author Posted February 12, 2009 (edited) It does work a treat. It also works fine if i want to see the next set of records (by setting the key field to the last visible record's ID + 1). The problems come if i want to go backwards rather than forwards. Because i don't know what the 9th previous records ID is (because it's no longer in the relationship) i can't use it to set the relationship ... which is why i was using the list. With the list, i can just go up and down the list, take any particular value out (ie the 1st, 10th, 19th 28th etc and put it into the relationship ... and then let each portal sort itself out ... hope that explains, Slater Edited February 12, 2009 by Guest
bcooney Posted February 12, 2009 Posted February 12, 2009 Well, maybe the GetValue( ) function combined with List ( ) would help.
Slater Posted February 12, 2009 Author Posted February 12, 2009 Ah, that did it! Many thanks - that's great
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now