I have the following requirement:
If the user selects a "Due Date" of TODAY and the current time is after 3pm, we should prompt the user that the request will not be processed until tomorrow. The user should still be able to submit the request.
I'm having a problem understanding how to do real-time validation on Nintex Forms so that I can prompt a user as they are entering in data. I have tried using calculated value controls so I can use those values in formatting rules but it doesn't seem as though the function dateDiffMinutes(Current Time,"15:00:00") doesn't work in a Calculated Control. In validation rules, the fn-dateDiffMinutes function does work.
Ideally, I would be able to write a formatting rule that would display a message on the form only if today's date is today and time time is after 3pm.
This is close. I have figured out how to show a label control if the time is after 3pm. I use the following expression on the Visible property of the control:
That works so far with all the testing I have done. Now I am trying to add the value of the DueDate control. It is a DateTime control and I want to add something that says - If value of DueDate equals Current Date. Whenever I select a date on the control, nothing happens. The problem I am having is getting the value of the DateTime control to use in a function. The only options I have are: Common, Item Properties, Workflow Constants, Inline Functions.
I would recommend to use formatting rule and not appearance settings.
there are main two reasons
- appearance setting formula can only work with inline function and can not refer to other controls on the form
- the formula is only evaluated on form load and not at form runtime
using formatting rule you will be able to build a formula just like in reffered discussion.
eg, it might look like following. if it evaluates to true then hide warning label
formatDate(DueDate,'HH')*60 +formatDate(DueDate,'mm')*1 < 15*60