Welcome to openkapow Sign in | Join
in Search
.

Concatenating values

Last post 07-16-2008, 9:28 AM by roguelj. 5 replies.
Sort Posts: Previous Next
  •  06-09-2008, 9:07 AM 19823

    Concatenating values

    Hi all.

    I have a need to concatenate values returned from a for loop.

    I have tried using the Evaluate Expression step, using 'RESTOutput.value2 + INPUT' as the expression, but this does not appear to work correctly.

     

    Any ideas? 

  •  06-09-2008, 2:25 PM 19826 in reply to 19823

    Re: Concatenating values

    Hi

    This is probably because all attributes are reset for every iteration of the loop. You have to assign the value to a Global Variable for this to work.

    Are you with?

    -Simon

     

  •  06-10-2008, 12:19 AM 19831 in reply to 19826

    Re: Concatenating values

    Ah, I see.

    I'll give global variables a try!

     

    Thanks, 

  •  07-16-2008, 7:06 AM 20447 in reply to 19831

    Re: Concatenating values

    I have tried using global variables, and still cannot get it to work. Each time it appears to reset either the global variable or the attribute.

     

    Basically, I am looping through a series of DIV tags using a For Each loop.

    I can extract some information (text) from one of the HREF tags within the DIV tag, and drop this into RESTOutput.value1

    Each DIV tag contains an unspecified number of IMG tags. What I need to do is loop through these, extracting the src attribute from the IMG tags. Then drop all of the src attribute strings, concatenated into one long string, into RESTOutput.value2.

     

    This is driving me slightly crazy! Robomaker is very good and very intuitive to use, but this one has me banging my head against the wall.

     

    Any help would be greatly appreciated.


    Thanks,

  •  07-16-2008, 7:32 AM 20448 in reply to 20447

    Re: Concatenating values

    When I do this type of evaluation expressions, I use the ScratchPad output object to do that work in then copy the ScratchPad values into the REST output fields.

    To enable the ScratchPad, follow these steps:

    • In the bottom right panel of RoboMaker, click the Output Objects tab
    • Click the Add/Remove... button
    • Click the + sign
    • In the selection pulldown, select ScratchPad
    • Click Ok

    You will now have a new set of output fields you can write output to.  Choose the appropriate one and try using that for your Evaluation work.

  •  07-16-2008, 9:28 AM 20450 in reply to 20448

    Re: Concatenating values

    That does look useful - I didn't know that you could do this.

     

    As it stands, it didn't solve my problem directly, but it did enable me to see where I was originally going wrong, and for this, I thank you.

     

     

View as RSS news feed in XML
.
Copyright 2006, 2007 KapowTech.com All Rights Reserved Company | Contact | Terms | Privacy