cancel
Showing results for 
Search instead for 
Did you mean: 

Date and number display format

Former Member
0 Kudos

Hello all,

I am new to Adobe Form, and I am quite unimpressed with how difficult it is to do the most simple things.

I have managed one way or another to solve all my problems until now, but this one got me stuck.

I have date and number fields in my form, and here is what I want to do but cannot:

- I need these fields to be displayed using the defaults date and number settings of the SAP user who is generating the form. This one is really hard for me to figure out.

- I need some other fields to be displayed in a specific format depending on a variable in the context of my form. I imagine this could be done using scripting, but how to change the display format of a field via scripting?

Anyone has an idea of how that can be achieved?

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Thomas,

For these kind of issues you will get many answers if you search the forum.

If your requirement is to display the current date in the form, just drag and drop the "Current date" UI element from the Library palette -> Custom.

If it is to get the date from SAP and display, pass date to the context node and just drag and drop the field into the form from the data view.

Check the following wiki by Chintan. It explains some common scenarios in javascript.

[JavaScript Part 1|http://wiki.sdn.sap.com/wiki/display/ABAP/JavaScriptforCommonScenarios-PartI]

[JavaScript Part 2|http://wiki.sdn.sap.com/wiki/display/ABAP/JavaScriptforCommonScenarios-PartII]

Use an 'if' condition, check the value and based on the value you can make the field hide/visible in the form.

Hope this will help.

Thanks & Regards,

Sanoosh

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

Thank you for your answer. Based on that and on other sources I have found a working solution.

I have defined a few locales in the XML file (localeSet tag). In the form layout, in the initialize event of my date and decimal number fields, I test the value which determines the locale and do:

$.locale = "xx_XX".