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

Question

Question

Pass Date to form via URL and custom tab

asked on November 16, 2018

So I have a custom tab in WebAccess that launches a Form and passes variables.  It seems to work but doesn't work on a date.

Here is my template:

 

Here is the custom tab:  http://localhost/forms/poverify?vendorname=[Vendor Name]&ponum=[Purchase Order Number]&total=[Total Amount]&entryid={id}&date=[Date]

 

When I click the tab in WebAccess I get the form with everything but the date:

 

If I enter the actual info in the URL and bypass using the tokens in the custom tab interface:

http://localhost/forms/poverify?vendorname=AZZ Galvanizing - Winsted&ponum=818661&total=464.50&entryid=123&date=10/22/2018

It seems to work.

Any idea as to why?  I did try and re-order the entry ID to another spot since I noticed it used {} instead of [] (probably because its built in and not from the fields) but it still doesn't work.

 

Thanks,

Chris

0 0

Answer

SELECTED ANSWER
replied on November 16, 2018

I played around with this a little bit and think it has to do with the date formatting. If you map a metadata date field into a Forms single line field, you see the format of the metadata field is 2018/11/16 00:00:00. By default, the Form date fields have the format M/d/yyyy, so the metadata date field isn't going in properly. I changed the Form date field format to yyyy-MM-dd, and that transferred the metadata value successfully. 

As a workaround, I'd suggest changing the Form date field to yyyy-MM-dd and see if that works for you. We'll look into improving this experience. 

0 0

Replies

replied on November 16, 2018

If you use the browser's developer tools, you'll be able to see what URL Web Access is assigning to the iframe.  Is it what you expect?

Also, I know you are just in the development phase, but it's a good habit to not use "localhost".  It's never what you want long-term, and it can cause different behavior than if you used the host name.

0 0
replied on November 16, 2018

Thanks Brian and Jared,

Yeah, this is just a VM doing a proof of concept type thing so will not be using localhost.

When inspecting the iframe it shows the following URL.

http://localhost/forms/poverify?vendorname=Amazon - Business Account&ponum=818673&total=348.48&date=2018/10/23 00:00:00&entryid=45834

So it seems that WebAccess is turning the format of the date field on the template (which is just the standard short date field in the admin console) into a totally different format including time in a URL (which is certainly not what we want).

I did change the field format on the form to yyyy-mm-dd and it did successfully pass it but none of our clients reference dates in this format.  Maybe will have to pass to a hidden field and use JS to move it to a normal date or something.

Would be great if that got added to a feature list/fix for the future.

Thanks again,

Chris

0 0
replied on June 30, 2020

Chris did you ever find a solution to fixing the date format from a UK format to a US format on the form?

0 0
replied on July 1, 2020

I have not tested it recently.  All recent projects haven't involved passing a date anymore, just various ID's.  You would have to fire up a test to check it out.

0 0
replied on July 1, 2020

was your client ok with the format YYYY-MM-DD or did you have to change that?

0 0
replied on July 1, 2020

They rolled with the format acknowledging the limitation/bug

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

Sign in to reply to this post.