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

Dynamic text in text objects!

Former Member
0 Likes
1,170

Hello Smartform experts,

I have a requirement here for which I am trying to find a solution.

I had created a text name 'zinst' with text object 'text', text id 'st' which contains the terms and conditions.

I had hardcoded the company name in the text. But the requirement is they want to use the same form for different companies and the company name in the text should be dynamically populated.

How can I do that?

Thanks,

1 ACCEPTED SOLUTION
Read only

sridhar_k1
Active Contributor
0 Likes
979

If company name field is available to you in the smart form, then replace the company name in the standard text with that variablename.

for ex: replace the name with &T001-BUTXT&, see if it works.

Regards

Sridhar

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
979

You can do this, but you will have to read the text in your program and the replace a placeholder. In your standard text, you need to have a "place holder" for the company name. For example, lets say it is <company_name>. Then read the standard text using the READ_TEXT function module. Now you can read the specific line, and replace the placeholder with the company name. Make sense?

Regards,

Rich Heilman

Read only

sridhar_k1
Active Contributor
0 Likes
980

If company name field is available to you in the smart form, then replace the company name in the standard text with that variablename.

for ex: replace the name with &T001-BUTXT&, see if it works.

Regards

Sridhar

Read only

Former Member
0 Likes
979

Naren,

In that case, you cannot use the INCLUDE TEXT option as you have manually read the text (READ_TEXT) and replace the company name.

However, if you can maintain one text for each company code you have in SO10, then you can dynamically get the text name and use that.

Regards,

Ravi

Read only

0 Likes
979

Thanks for all your replies.

What I had done is, I had created different text object names for each sales org and I am moving that text name to a variable based on the sales org in the include text of my smartform.

In the text name of INCLUDE TEXT I am passing the variable as &variable& instead of the text name.

Thanks,