Combine request results


This topic contains 1 reply, has 2 voices, and was last updated by  Denny Wong 2 years, 1 month ago.

  • Author
  • #4202

    David Cook


    I have a zone stamp that has the following line in the Master Script which returns the ID of the zone. Works great.
    x = REQUEST("ID_of_main", "", IDText)

    We’ve got a project where we want to hot link in a module several times and add the prefix. Now I can get the prefix to show up, but not the ID if I change this line to
    x = REQUEST("Full_ID_of_parent", "", IDText)

    Is there any way I can do a double request
    x = REQUEST("Full_ID_of_parent" & "ID_of_main", "", IDText)

    or filter the results into a secondary line of code to get the IDText variable to display them as a combined result?

    x = REQUEST("ID_of_main", "", IDTexta)
    x = REQUEST("Full_ID_of_parent", "", IDTextb)
    IDText = IDTextA & IDTextB

    Appreciate any assistance/advice/ that can be provided. I’m still relatively new with this side of the GDL commands.


    Dave Cook

  • #4224

    Denny Wong

    Hi David,

    Not sure if I got your question correctly – this sounds more to do with string concatenation rather than the REQUEST itself. & operator in GDL is a Boolean operator; + is the operator you are looking for:

    n1 = REQUEST("ID_of_main", "", IDTextA)
    n2 = REQUEST("Full_ID_of_parent", "", IDTextB)
    if n1 and n2 then
      IDText = IDTextB + IDTextA
      print "Something went wrong"

    I am not sure if REQUEST will give an Integer if IDTextA turns out to be all numbers, in which case you might need to do a VARTYPE then str(“%.0”, IDTextA) before concatenating.

    I also want to point out that if you put these REQUESTS in the Master Script, they will produce a numerical “0” if GLOB_SCRIPT_TYPE is Parameter Script. If you then try to + two 0s together obviously you will get a 0. If your confusion comes from seeing 0s as your script result, may be that’s the reason.

    kind regards,


    Bond Bryan Architects, Westerham, UK

The forum ‘Informations from the environment’ is closed to new topics and replies.