Method Community

 

LIKE Operator OR Contents Operator

Last post 04-26-2016 10:57 AM by Method_Ben. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-25-2016 5:30 AM

    • kumara
    • Top 500 Contributor
    • Joined on 04-25-2016
    • Posts 6

    LIKE Operator OR Contents Operator

    Im trying to get  So No from below table witch has the serial numbers seperated with space if it has more than one.

    can anyone tell me how can i use 'Like or  'content' Operators  and retrive the SO NO

    Go To So
    SO NO
    Item
    Qty
    Serial NO
    Delete
    Go To So 15/16-1205 17 - Ink / Solvent (Assembly):17260-01-HA 2 H144326AA281681A17 Delete
    Go To So 15/16-1205 17 - Ink / Solvent (Assembly):17181-HA 1   Delete
    Go To So 15/16-1202 17 - Ink / Solvent (Assembly):17260-01-HA 1 H144333AC161681A17 Delete
    Go To So 15/16-1202 17 - Ink / Solvent (Assembly):17181-HA 2   Delete
    Go To So 15/16-1201 09 - Print Head:09008 1 3536429 Delete
    Go To So 15/16-1200 42005 1   Delete
    Go To So 15/16-1200 37159-06 1 3610 3595289 3593308 3594107 3594401 3594040 Delete
    Go To So 15/16-1200 37159-06 1 3670 3595888 3594427 3593410 3593337 3595728 Delete
    Go To So 15/16-1200 37027-01-02 1   Delete
    Go To So 15/16-1200 36053-02 30   Delete

  • 04-25-2016 11:41 AM In reply to

    Re: LIKE Operator OR Contents Operator

    Hi There Kumara,

    Judging from the way youve copied the Data here, Im going to assume you have the data presented in a grid, which is great! It helps us make this one process a little more efficiently.

    A few questions for you; First, are all the individual Serial Numbers unique? specifically, when you search for a serial number, are you Always expecting only one result? Second, when querying the table, will you or your user always know the entire Serial Number? or just a portion of it?

    Assuming that the individual Serials are Unique, and the user will always know one of the Serial Numbers in its entirety, the best way would be to utilize a Loop Through Grid Action with a Nested Conditional Statement, which checks that the 'Serial NO' field Contains a particular value

    The Above Screenshot is an example of a button which will retrieve a value in a scenario similar to yours. The Important part here is the Conditional Statement, which checks if Value from Row - Serial Number Contains my chosen serial number. If it does, then it processes the Third Action, which in my example enters the Name of the rows Item into a value on screen. You can shoose any action for this step (ie assign to Action result etc...)


    If you want me to break down any particular part of this any further, let me know and Ill be happy to help out.

    Thanks Kumara.



    -Ben

    Ben Hargreaves
    Senior Support Specialist
    Method:CRM
    b.hargreaves@method.me
    Toll Free: 1.888.925.6238
    Local & Overseas: 416.847.0400
    Fax: 416.640.6027
  • 04-25-2016 1:47 PM In reply to

    • kumara
    • Top 500 Contributor
    • Joined on 04-25-2016
    • Posts 6

    Re: LIKE Operator OR Contents Operator

    Hi Ben

    thanks for the quick respond.

    acturly this data is not in the grid controller. i just want to select it from the table stright.

    this serial No are uniq if it has only one serial in one feild i can retrive it but if it has more than one with the space between i cant retive it using normal rettrive from table option. 

    ex : as you can see in raw 7 serial number feild it has many serial NO if i seach with one of it ( 3594401) it need to identify that and give me the SO NO as a return.

    thanks in advance

  • 04-26-2016 10:57 AM In reply to

    Re: LIKE Operator OR Contents Operator

    Hi Kumara,

    In the case your are just querying the table directly, Most of the logic in my above post still holds true. The only major differences being that in Action 1, you would use a Start Loop through Table  action, rather than a loop through grid, and you would also need to add a 'Retrieve value from table' action somewhere after the Conditional Statement. 


    Again, the most important part here is the Start Conditional Statement action. 


    In my example, the 'LicenseNo' is similar in format to your SerialNo field. I added data that contains values like

    • Abc123 bcb234 123abc
    • xyz567 lol101 method123

    If I search specifically for '123abc' using the above logic, only the first record will be returned.

    -Ben

    Ben Hargreaves
    Senior Support Specialist
    Method:CRM
    b.hargreaves@method.me
    Toll Free: 1.888.925.6238
    Local & Overseas: 416.847.0400
    Fax: 416.640.6027
Page 1 of 1 (4 items)