Method Community

 

How do I build the selection list

Last post 09-22-2010 3:19 PM by Method_Paul. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 09-20-2010 6:14 PM

    • seny
    • Top 150 Contributor
    • Joined on 07-15-2010
    • Posts 32

    How do I build the selection list

    I see there is an option when I try to filter a grid, called "Build Selection List",

    and after I choose that option, I have some other options for the list: Type In, Value From Screen, Value From Session, Get Value From Shared Result.

    I'd like to know how can I build up the list into a Shared Result so that I can use it in the filter.

     

    Thanks

  • 09-21-2010 4:55 PM In reply to

    Re: How do I build the selection list

    Answer

     Hi Seny,

    You can create a Shared Result on any screen by using the action 'Assign Value to Shared Result'. Here you'll specify the value of the shared result and you'll assign a name. When you set up the grid filter, you'll use the Shared Result name you specified. The good thing about using Shared Result, is that you can set the value of the Shared Result on a different screen, other than the screen that you are setting the grid filter on.

  • 09-22-2010 11:34 AM In reply to

    • seny
    • Top 150 Contributor
    • Joined on 07-15-2010
    • Posts 32

    Re: How do I build the selection list

    I know I could use a shared result, however, my question was how do I build the list?

    which means that I will have a list of values need to be stroed in the shared result, so how do I "Join" multiple values into a Shared Result, so that later on when I use it, it will looks like a list in stead of a long string?

    Thanks.

  • 09-22-2010 11:43 AM In reply to

    Re: How do I build the selection list

    Seny - use a Character function, and "Join with Comma". 

    Paul

  • 09-22-2010 1:39 PM In reply to

    • seny
    • Top 150 Contributor
    • Joined on 07-15-2010
    • Posts 32

    Re: How do I build the selection list

    Thanks, btw, does it matter if in one of my values there is already a comma?

  • 09-22-2010 2:28 PM In reply to

    Re: How do I build the selection list

    Seny - it's going to do a simple "split" function in the backend to turn it into an array.  So your extra comma will just cause an extra selection list value.  It's very basic - so hopefully this is what you need.

    Hope that helps,

    Paul

  • 09-22-2010 2:57 PM In reply to

    • seny
    • Top 150 Contributor
    • Joined on 07-15-2010
    • Posts 32

    Re: How do I build the selection list

    That's what I thought.

    As long as I know it will cause a split, I will just make sure that there are no commas before join another one.

    Thanks.

  • 09-22-2010 3:19 PM In reply to

    Re: How do I build the selection list

    Seny -

    A tip for you.  You'll see in some of the apps where we use a selection list, we'll do something like:

    1. Set resultSelectionList to "-99" in the first action of "Assign Value to Action Result".

    2. Start Loop Through Table.

    3. Character Function, "Join with Comma" resultSelectionList to value from row 'RecordID', to create a new resultSelectionList.

    4. End Loop Through Table.

    That way you end up with something like resultSelectionList = -99,1,2,3,4,5

    Since -99 is never a valid value for RecordID, and it was declared as -99 so it will always be ignored.  Much easier than trimming off the last comma.

    Paul

Page 1 of 1 (8 items)