Method Community

 

Typed in Selection List example needed

Last post 05-21-2014 8:02 AM by Method_Russell. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-20-2014 12:08 PM

    Typed in Selection List example needed

    I need to unlock a screen field only for specific users by name.  I have a conditional statement with Build Selection List based on Session User Name.  I use Type In with the list of users I want to have the condition return true for.  I have a list of users, such as:  'karen.a','valerie.c','robert.c','peter.i'  in the Value 2 input area to the right of Type In.  I know that the Session User Name is correct (used Show Message) but the list is not properly executing the SQL "IN" statement to evaluate the Selection List expression.  

    Can someone please give me an example of a working selection list? There isn't a single example of a manually typed in list on the Method site or forum.  I tried putting my list inside a () but that didn't fix it.  

    Help!

  • 05-20-2014 2:09 PM In reply to

    Re: Typed in Selection List example needed

    Hi Robert,

    You're almost there. You can remove the apostrophes from your Type In list, the list should be in comma separated format instead of SQL format. For example:

    karen.a,valerie.c,robert.c,peter.i

    -Russell

  • 05-20-2014 2:40 PM In reply to

    Re: Typed in Selection List example needed

    I will try this.  Is this a SQL IN () clause?  Are you parsing the commas into ',' and adding ( and ) on the ends?  That must be what you are doing because in another filter I have the following working fine: RecordID > 0  AND Class IN ('<City>','_National').   "Build Selection List" must be editing my list thusly.

  • 05-21-2014 8:02 AM In reply to

    Re: Typed in Selection List example needed

    Hi Robert,

    Yes, the Build Selection List filter is equivalent to a SQL IN clause, and that's how it's parsed. There are other parts of Method that can be closer to pure SQL, such as filtering tables, grids, and reports.

    For more information, please see this article: http://www.methodintegration.com/method/kb.aspx?folder=methodcrm&article=Using-filter-with-script&id=272 and this webinar: https://www.youtube.com/watch?v=D1D6QWdXG0I&list=PLG5Qmoh21vN4Od1mRtrDoY6NyPabWApjx

    -Russell

Page 1 of 1 (4 items)