field1 = ‘field2’ (this is a text)
and field2= ‘john’
and name of field2 is variable the only way to get name of second field is from field1 … I have tried several ways but not working. Could you please guide me …with some suggestions.
For your scenario, don’t worry about variable substitution. You can do what you need with a simple Java service. E.g.:
This service takes an input string called ‘key’ and returns a string called ‘value’. ‘key’ is the name of the variable whose value you want and ‘value’ is that value.
As you can imagine, true nested substitution would be extremely challenging using percent signs only (or any single character) because, for example, you could have a scenario such as %a%b%c% which could mean different things, like + ‘b’ + or <value of <‘a’ + + ‘c’>>
If you make an assumption that nested substitution will always take the simplistic form of %%variable%% … %%%%%variable%%%%%, you should be able to easily write your own service using the PSUtilities code and the code above as a reference.