CRG2019 Posted August 1, 2019 Share Posted August 1, 2019 I am setting up/concatenating results of a loop to form an XPATH which resides in strChar2. I can't seem to be able to access the value of the XPATH. I have tried 50 or so variations of eval, evaluate, evalString, evalElement and so on - with no luck! Can you solve this? Note that strChar3 below is what I am trying to set up. strChar3 needs to contain the value of the XPATH (i.e. not the actual XPATH). I cannot hardcode the XPATH as getting values in a loop. Thanks for helping. String strChar1 = evalString('$resultConvert/parameterType') String strChar2 = "parm/uploadRecord/inputRecord/"+strChar1 String strChar3 = evalElement("strChar2") Link to comment Share on other sites More sharing options...
Ingolme Posted August 4, 2019 Share Posted August 4, 2019 This looks more like Java than Javascript, but Java only uses single quotes for char type values, not strings so this wouldn't work in Java either. Which programming language is this? Link to comment Share on other sites More sharing options...
CRG2019 Posted August 4, 2019 Author Share Posted August 4, 2019 It's actually groovy, but for some reason using javascript guides works better for us. Groovy guides never seem to work. So don't look at the quotes because I can work that out - try double quotes, single quotes, no quotes, etc. but I really want to find out the command to use that will transfer the XPATH. In scripting I've used "evaluate" before but it doesn't seem to work with this type of groovy. Thanks for any help you can provide! Link to comment Share on other sites More sharing options...
CRG2019 Posted August 6, 2019 Author Share Posted August 6, 2019 There must be a list of advanced commands somewhere??? Link to comment Share on other sites More sharing options...
justsomeguy Posted August 6, 2019 Share Posted August 6, 2019 Like most programming languages, there's documentation: https://groovy-lang.org/documentation.html https://groovy-lang.org/api.html Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now