You are viewing limited content. For full access, please sign in.

Question

Question

Forms - date field format is changed at the last minute

asked on April 24, 2017 Show version history

I found an option in forms to format a date the way a customer was asking for. It formats it like this yyyy-MM-dd

I inserted this token into a string field in the template when saving to the repository. Well it somehow came out like this. d/MM/yyyy

 

0 0

Replies

replied on April 25, 2017 Show version history

Can you check the field settings for 'Invoice #'? Is there any special formatting on that field? You can see this in the desktop or web administration consoles. 

Is the ADVANCE text part of the mystery? Or is that appended on in the save to repository task?

replied on April 25, 2017 Show version history

When you change the date format on a Forms date field, you are just changing the display within Forms. If you mapped a Forms date field to a metadata date field, you would have to set the format on the metadata date field as well to get the desired format in the Client. 

The format actually saved back to the server will use the routing engine service user's date formatting structure. 

If you could use a date field instead of a text field, you could simply format the date field in the client to match what you have in Forms. If you want to keep it as a text field, you may have to look into some regular expressions and pattern matching to manually reformat the field. The other solution would be to update the AppPool user's and routing service user's date format so the date token in Forms is saved accordingly. 

 

Oh, another thing you can try:

In the Forms directory, take a look at the file located at

Laserfiche Forms\Forms\bin\RoutingEngineServiceHost.exe.config (make sure you are trying to open the config file and not the exe itself). You can set the keys    

    <add key="UseSystemDateTimeFormat" value="false" />
    <add key="DefaultDateTimeFormat" value="MM/dd/yyyy hh:mm:ss a" />
    <add key="DefaultTimeFormat" value="hh:mm:ss a" />
    <add key="DefaultDateFormat" value="yyyy-MM-dd" />

to tell Forms not to use the system Date/Time format for the service user, but to use the values listed here. Make sure to back up the file before you modify it. 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.