How to use a variable within the context.expand string (groovy)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2016
02:40 PM
04-25-2016
02:40 PM
How to use a variable within the context.expand string (groovy)
I'd like to pass in a variable to the following command within a groovy script, in order to take advantage of the 1.7 functionality with respect to iterations on data sources:
context.expand('${Roster#startDate::0}')
where "0" would be replaced by an integer value (String or int, doesn't matter as long as it works).
This is probably a basic groovy question but I can't seem the get the right combination.
Thanks!
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2016
11:49 PM
04-25-2016
11:49 PM
Assuming that you have some value in the variable myValue, this would insert the value into the property expansion in lieu of 0:
context.expand('${Roster#startDate::' + myValue + '}')
Kind regards,
Manne, Ready! API Developer
