Application Development and Automation 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: 
Read only

Passing Value Dynamically in a string

Former Member
0 Likes
1,626

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
Read only

Former Member
0 Likes
1,070

try

txt = param.

ex:

param = 10.

data : txt type string .

txt = param.

Read only

Former Member
0 Likes
1,070

Hi Abhi,

Data : txt1(10).

txt1 = param.

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

Write : txt.

Regards,

Sudhakar.

Read only

0 Likes
1,070

thanks

Read only

FredericGirod
Active Contributor
0 Likes
1,070

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

Read only

former_member186741
Active Contributor
0 Likes
1,070

you could do:

data text type string value 'value of &'.

replace '&' with param into text.

condense text.

write:/ text.

Read only

Former Member
0 Likes
1,070

Hi

parameters: param(10).

Data : txt1(20).

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

Write 😕 txt1.