Method Community

 

Curious.

Last post 10-26-2009 10:12 AM by Joe. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 10-22-2009 2:25 PM

    • Joe
    • Top 50 Contributor
    • Joined on 08-17-2009
    • Posts 97

    Curious.

    Hi.

    Does the "Loop Through Table" action always go through every record, top to bottom, under all circumstances?

    ~Joe

  • 10-23-2009 2:33 PM In reply to

    Re: Curious.

    Hi Joe,

    This action is used to ‘loop’ through only records that meet the specified criteria set up under the where condition(s) within the action properties.

    It will loop through the records using the record ID in ascending order for those that meet the where condition(s). You should be able to change this by using Order by (optional) when setting up the action. However, we’ll need to put an update in to accommodate for when this option is being used.

    I’ll keep you posted on the update,

    Need more help? Ask us about Method consulting services.

    Valbon Shabani
    Director of Education
    Method Integration Inc.
    Toll Free: 1.888.925.6238 ext. 715
    Local and overseas: 416.847.0400 ext. 715
    Fax: 416.640.6027
    E-mail: valbon@method.me
    Website: http://www.linkedin.com/in/valbon
  • 10-23-2009 3:24 PM In reply to

    • Joe
    • Top 50 Contributor
    • Joined on 08-17-2009
    • Posts 97

    Re: Curious.

    Hi Val.

    I made a teeny mistake with my question lol.

    I meant to ask the same question only about the "retrieve value from table".

    So my 2 questions regarding this action: "Retrieve value from table"

    1) This action has an option to say "If multiple results, Retrieve first". If this option is selected, when method finds a record matching the criteriia will it stop processing and give me back that value or will it continue to find every record that matched my criteria then go back and choose the first one from that list? ... Obviously the latter is a bit redundant.

    2) I don't know how direct the access is for the programmers to get at these tables' records, but is it possible to streamline this action when retrieving a value whose record number you already know? So if i asked for field "myField" at record number 42 ... is method able to return back (example):: MyTable.myField.record(42) .... instead of traversing the entire table of say 60 records looking for all 42s .. followed by returning the only one it found.

    Method may already be as streamlined as it gets on these programmatic features ... I'm only asking so that when i go to use these features I can take the fastest route possible and not get stuck using a generic form that will get the job done but run like a slug when needing to find something multiple times that could otherwise be more easily retrieved if coded differently or a new action was created with that in mind.

    Thanks,

    ~Joe

  • 10-26-2009 9:21 AM In reply to

    Re: Curious.

    Answer

    Hi Joe,

    We all make teeny mistakes so we’ll let this one slip by us.Stick out tongue

    1. As soon as the first one is a match it will stop searching additional records.
    2. The only values returned from the query are those which contain the selected criteria. There should never be a case which all records are returned unless of course you specify something like where RecordID > 0. If you know the specific RecrodID, then you could retrieve value from table where RecordID = 42 with direct access to that record.

    Good questions,

    Need more help? Ask us about Method consulting services.

    Valbon Shabani
    Director of Education
    Method Integration Inc.
    Toll Free: 1.888.925.6238 ext. 715
    Local and overseas: 416.847.0400 ext. 715
    Fax: 416.640.6027
    E-mail: valbon@method.me
    Website: http://www.linkedin.com/in/valbon
  • 10-26-2009 10:12 AM In reply to

    • Joe
    • Top 50 Contributor
    • Joined on 08-17-2009
    • Posts 97

    Re: Curious.

    Answer

    Thx for the info =),

    ~Joe

Page 1 of 1 (5 items)