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

Question

Question

Electronic Bidding Form that is saving Cached Data

asked on June 3, 2020

I have created an E-Bid form for submitting bids.  I am passing variables to the form via the URL for variables like bid closing date and bid closing time.  If the current date/time is past the bid closing date/time, a bid submission is not allowed.

The issue I am having is that if the form was visited before the closing date/time, you can return to the form and submit the bid after the closing date/time.  If I clear the browser cache, the form operates as expected.

Any ideas on how to correct this situation?

0 0

Answer

SELECTED ANSWER
replied on June 4, 2020

Try replacing the Submission_Date and Sub_Time variables with the NOW() function. Instead of using a separate field, that will perform the calculations with the current date/time when the form loads.

For example,

=DATEDIF(DATEVALUE(NOW()),Close_Date,"D")

=SUB(TIMEVALUE(NOW()), Close_Time)

 

And you could also simplify your status formula by using the OR and AND functions

=IF(OR(Date_Diff<0,AND(Date_Diff=0,Time_Diff<0)),"ONTIME","LATE")

Basically, either Date_Diff is less than 0, or Date_Diff is 0 AND Time_Diff is less than 0.

 

One thing to look out for is that you'll need a lot of decimal spaces if your Time_Diff field is a number field because the difference could be very small and that calculation may not behave properly if enough of the value is rounded/truncated.

Another option is to just consolidate time diff into the one function and get rid of the independent "Time_diff" variable. Then you shouldn't have to worry about the decimal length of the number fields and you could eliminate more variables.

=IF(OR(Date_Diff<0,AND(Date_Diff=0,SUB(TIMEVALUE(NOW()),Close_Time)<0)),"ONTIME","LATE")

0 0

Replies

replied on June 3, 2020

How are you determining/tracking the current date and how are preventing submission?

0 0
replied on June 4, 2020

I am publishing a url like this <my url>//Forms/Bids Close_Time=02:00:00%20PM&Close_Date=06/03/2020. 

 

The Forms field variables are Close_Time and Close_Date.  I validate the the current date/time upon entry to the form.  I have a field rule that hides the submission data and shows a message that bidding for this solicitation is closed.

0 0
replied on June 4, 2020

Okay, and how are you validating the current date/time? Are you using any custom JavaScript, or are you doing it entirely with built-in functionality?

1 0
replied on June 4, 2020

Built in functionality.  I have three Form fields using Advanced->Calculation

Date_diff: =DATEDIF(Submission_Date,Close_Date,"D")

Time_diff: =SUB(Sub_Time, Close_Time)

Bid_Status: =IF(Date_Diff=0,IF(Time_Diff<0, "ONTIME", "LATE"),IF(Date_Diff>0, "ONTIME","LATE"))

0 0
SELECTED ANSWER
replied on June 4, 2020

Try replacing the Submission_Date and Sub_Time variables with the NOW() function. Instead of using a separate field, that will perform the calculations with the current date/time when the form loads.

For example,

=DATEDIF(DATEVALUE(NOW()),Close_Date,"D")

=SUB(TIMEVALUE(NOW()), Close_Time)

 

And you could also simplify your status formula by using the OR and AND functions

=IF(OR(Date_Diff<0,AND(Date_Diff=0,Time_Diff<0)),"ONTIME","LATE")

Basically, either Date_Diff is less than 0, or Date_Diff is 0 AND Time_Diff is less than 0.

 

One thing to look out for is that you'll need a lot of decimal spaces if your Time_Diff field is a number field because the difference could be very small and that calculation may not behave properly if enough of the value is rounded/truncated.

Another option is to just consolidate time diff into the one function and get rid of the independent "Time_diff" variable. Then you shouldn't have to worry about the decimal length of the number fields and you could eliminate more variables.

=IF(OR(Date_Diff<0,AND(Date_Diff=0,SUB(TIMEVALUE(NOW()),Close_Time)<0)),"ONTIME","LATE")

0 0
replied on June 4, 2020

WOW!  Thank you again!  This should work perfectly!

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

Sign in to reply to this post.