Method Community

 

Lifecycle of Action Results

Last post 10-18-2013 12:10 PM by furrywombat. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 10-16-2013 11:28 AM

    Lifecycle of Action Results

    I would like to know more about the lifecycle of an action result. Been running into problems with action results being wiped out before we're able to use them in a conditional statement, calculation, etc... seems as though this is happening sporadically, surviving one time in an action set but not surviving in the next. When exactly does an action result get wiped out? If it's created inside a loop, will it be available outside of that loop? If it's created inside a conditional statement, will it be available outside of that conditional statement? Is it only screen-to-screen that shared results are necessary?

    Thanks in advance!

  • 10-17-2013 8:27 AM In reply to

    Re: Lifecycle of Action Results

    Hi Charles, 

    Action results can only be used within the same object/field in which they are created. You can create one in an action set, and it should be available in subsequent actions of that action set. Shared results however can be retrieved anywhere else in Method, including different fields/objects and different screens, with a Get Value from Shared Result action. Action results shouldn't be wiped out in loops or conditional statements, but remember that if you have a conditional statement that isn't met, and the action result is created inside that statement, then the action result will not be created. Hope this clarifies!

    Jason

    Need more help? Ask us about Method consulting services

    Jason Masina
    Community Support Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.masina@methodintegration.com
  • 10-17-2013 8:47 AM In reply to

    Re: Lifecycle of Action Results

    Hey Jason,

    That's what I had assumed, but does not always seem to be the case. For example, I have an action set that loops through the invoice table. Pulls a few values by associating RecordID with the action result for the RecordID of the current row for table updates. Various character functions are in place to convert the unclean date to MySQL-compatible date, then a web service is called. After the web service is called it seems the action result is no longer available even though it's still within the loop. If I associate the table update by row value (RecordID) rather than the action result for RecordID, it seems to work (but not always!). Very frustrating... I'm also getting an error on action order 1 (begin table loop) after the loop completes... even though, after looking at the updated data in both Method, and on the other end of the web service having been called, all records seem to have been updated successfully. So, why the error?

    If you need more data on this to investigate, please contact me via email. 

    Best,

    Charles

  • 10-18-2013 8:53 AM In reply to

    Re: Lifecycle of Action Results

    Hi Charles,

    It sounds like you may be overwriting your original action result before you use it a second time. For testing purposes, I would suggest taking out the Call Web Service action and replacing it with a Show Message action. In the message, you can place all your action results to make sure that they are all being generated correctly. If everything looks good, you can put the Call Web Service back in, and put the Show Message action directly after it. Are the action results still in tact? If so, keep moving down your action set until you find where they are lost.

    Jason

    Need more help? Ask us about Method consulting services

    Jason Masina
    Community Support Specialist
    Method Integration Inc.
    Toll Free: 1.888.925.6238
    Local and overseas: 416.847.0400
    Fax: 416.640.6027
    E-mail: j.masina@methodintegration.com
  • 10-18-2013 12:10 PM In reply to

    Re: Lifecycle of Action Results

    Thanks Jason. Will do some testing to determine where the variables are being lost. Appreciate the help.

Page 1 of 1 (5 items)