cancel
Showing results for 
Search instead for 
Did you mean: 

Run time data binding via FormCalc/JavaScript+wrong text formating

Former Member
0 Kudos

Hello Everybody

I need to print a text block with company details depending on company code (different details for different codes). I tried to use this code for event "calculate":

if ($record.LS_HEADER.BUKRS == "1000") then

$ = $record.COMP_DETAILS_1000

elseif ($record.LS_HEADER.BUKRS == "1000") then

$ = $record.COMP_DETAILS_2000

endif

$record.COMP_DETAILS_1000, $record.COMP_DETAILS_2000 are elements from the form context which are linked to textmodules.

This code works and it prints correct textmodules for different company codes. But the printed text is not formated like text in the textmodules. The most important thing here is that these texts are always printed as a single long string and I need paragraphs like in the textmodules. It's a problem... If I use a statical binding (without FormCalc programming) the text modules will be printed with correct formating.

Using of checkbox "Allow Multiline Lines" hasn't helped here...

Have you any idea how should I do the run time data binding?

Thank you very much in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

OttoGold
Active Contributor
0 Kudos

Hello,

the important part is "If I use a statical binding (without FormCalc programming) the text modules will be printed with correct formating." That means you can get the text in the shape you want. Just do that. Get all the texts. Next use the JS/FC scripting to hide all but one text. You get only one text to display and you use static binding to get the proper text format.

Hope this helps, Otto