Reply To: Combine request results

#4224
Denny Wong
Participant

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
else
  print "Something went wrong"
endif

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,

Denny

Bond Bryan Architects, Westerham, UK