cancel
Showing results for 
Search instead for 
Did you mean: 

S4Cloud: Adobe Form - custom field hardcoded text not displayed on output

KatjaS
Explorer
0 Kudos
346

Dear Expert Community,

I have an Adobe output form (DEBIT MEMO) in S4Hana public cloud where I have added a field. The field is visible/invisible on the printout as expected, but the hardcoded value of the field remains empty / doesn't display. The caption of the field is correctly displayed (or not) as prompted by the conditions, proving that the active/inactive conditions work correctly. Just the value of the field doesn't get displayed.

The active/inactive condition of this field, as well as the hardcoded value, are controlled by a piece of java code as shown below (in the below, the real Partner number is replaced by XXXXXX):

<script contentType="application/x-javascript">if(this.parent.Partner.rawValue =="XXXXXX") {this.rawValue =="TEST"}; else
{
this.presence = "inactive";
}
</script>

What could be the reason and what could be done? 

Best regards,

Katja

 

View Entire Topic
0 Kudos

Hi,

I'm not that fit in Javascript via Adobe Forms, but it seems suspicious that you have two '=' signs. Maybe you can try = 'TEST' instead of == 'TEST'.

Does your logic even reach the If statement? There are many ways to fetch the parent values. Maybe you have to change that part. There is a way to fetch it via strings.. maybe that works.

Hope that helps

KatjaS
Explorer
0 Kudos
Hi Fabienne,
KatjaS
Explorer
0 Kudos
Hi Fabienne, Thanks for the suggestion! The double "=" -signs are as instructed by Java syntax, and they are successfully used that way in numerous other places in our output forms. Sometimes, I have seen even === recommended, but I usually stick to ==. I do think the if-statement is reached because I can see the caption displayed if the condition Partner = XXXXXX is met, and - converserly - not displayed if this condition isn't met. Also, I should add that the field length for the value is 20 characters and the value itself is less. The other properties of the field are identical with other fields that do work correctly.
0 Kudos

Hi Katja, got it. Does the code check work? Maybe you have to put the semicolon directly after the "TEST" Like that: == "TEST"; }

KatjaS
Explorer
0 Kudos
Hi Fabienne, You are right, thanks! I must have missed that at some point, or inadvertently reversed it. However, I changed and retested it, and it didn't solve the issue.
Hi Katja, maybe that link will help you. It is in german but you can translate it via google. It always helped me when it comes to javascript development in adobe forms:https://www.berater-wiki.de/JavaScript_und_FormCalc_Scripting_im_LiveCycle_Designer
KatjaS
Explorer
Thanks Fabienne, much appreciated!