Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Value Dynamically in a string

Former Member
0 Kudos

hi All ,

i have a requirement in which i have to pass value of a parameter dynamically to a string

e.g.

param = 10.

data : txt type string .

txt = 'value of param'.

should give a result

value of 10.

here i need to have the value 10 of param in the string ,

how can this be done dynamically

thanks in advance

Abhishek

6 REPLIES 6

Former Member
0 Kudos

try

txt = param.

ex:

param = 10.

data : txt type string .

txt = param.

Former Member
0 Kudos

Hi Abhi,

Data : txt1(10).

txt1 = param.

Concatenate 'Value of' txt1 into txt separated by space.

Write : txt.

Regards,

Sudhakar.

0 Kudos

thanks

FredericGirod
Active Contributor
0 Kudos

Hi Abhishek,

if you know where is the word 'param' in the sentence, you could play with the field symbols.

Good luck

Frédéric

former_member186741
Active Contributor
0 Kudos

you could do:

data text type string value 'value of &'.

replace '&' with param into text.

condense text.

write:/ text.

Former Member
0 Kudos

Hi

parameters: param(10).

Data : txt1(20).

Concatenate 'Value of' param into txt1 separated by space.

Write 😕 txt1.