App Connect Data Formatter Support Product Page

Answered

How can I assign an input value based upon a date condition?

Asked 25 Feb 2018 05:50:00
1
has this question
25 Feb 2018 05:50:00 Lee Woolsey posted:
I want to assign a value to an input field based upon the current date.

I have a database date field "lateDate" set with a date value. On my form, if today's date is <= lateDate i want the input's (fee_late) value to be 0.00, if the current date is > lateDate I want to set the input's value to 10.00

I haven't been able to figure out the conditional using the App Connect field pickups and formatters. Any help greatly appreciated.

Replies

Replied 26 Feb 2018 08:20:40
26 Feb 2018 08:20:40 Teodor Kuduschiev replied:
Hi Lee,
First you need to add the date and time component in app connect tree.
Then the field value would be:


Quotedmx-bind:value="var1.datetime > lateDate ? '10.00' : '0.00'"

Replied 26 Feb 2018 19:09:03
26 Feb 2018 19:09:03 Lee Woolsey replied:
Thank you. This works perfectly.

Reply to this topic