Method Community

 

Retrieve NULL Value From an Action

Last post 11-08-2012 4:45 PM by Blake C. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-07-2012 4:58 PM

    Retrieve NULL Value From an Action

    Is there any way I can check a value for NULL or empty prior to attempting to use it in an action?

    I've customized my Item table by adding a couple fields. Most Item records will not have a value set for these new custom fields but if an Item does have a value I need to use it in a series of custom Actions. When I use the 'Retrieve Value From Table' action, an error occurs b/c there's no value set.

    Does this make sense? How do I get around this? Is there something like an ISNULL check I can do from an Action?

    Thx

    Blake C
  • 11-07-2012 5:06 PM In reply to

    Re: Retrieve NULL Value From an Action

    Answer

    BTW, I immediately thought of a workaround. I just loop through the table for the field I'm trying to get the value for and inside the loop assign the value to an action result. Knowing there will be only one record to possibly loop over affectively sets the value if one exists.

    GOT to be a better way than this...what am I missing?

    Blake C
  • 11-08-2012 4:40 PM In reply to

    Re: Retrieve NULL Value From an Action

    Answer

    Hi Blake,

    The Loop Through Table/Grid actions are very useful and in this case you can set the condition to where "field" is not equal to, type in, and leave the text box blank. This will work as you want it to.

    - Ashur


    Need more help? Ask us about Method consulting services

    Ashur Shamon
    Lead Solutions Specialist, Professional Services
    Method Integration Inc.
    www.method.me
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: a.shamon@method.me
  • 11-08-2012 4:44 PM In reply to

    Re: Retrieve NULL Value From an Action

    Forgot to mention that if you have the grid on your screen then add a Refresh Grid action after your end loop through table action. Smile

    Need more help? Ask us about Method consulting services

    Ashur Shamon
    Lead Solutions Specialist, Professional Services
    Method Integration Inc.
    www.method.me
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: a.shamon@method.me
  • 11-08-2012 4:45 PM In reply to

    Re: Retrieve NULL Value From an Action

    Yeah, that's exactly what I wound up doing. Seems weird, but it works

    Blake C
Page 1 of 1 (5 items)