Alexie_Rose
Canvas Initiate

Restricted Date Selection

Hello,

 

I am new to nintex forms working in the responsive layout within Sharepoint. I have a form where users are able to select a date for an extra week of vacation if eligible. When they select a date, the form must check if the user has a pending request for the leave period. If there is a request for the selected period the form should stop them, but if the period is available it should tell the user the date selected is available and allow them to proceed with submitting the form. Pictured below is the eligibility table built within the form to show the user their availability. In this example the 15th year anniversary period is not used so the form should allow me to enter any date between 9/2/20212-9/1/2017 (If the period wasn't in the past that is), but reject any other date selection from the ranges shown as it's not available. 

 

Alexie_Rose_0-1622743610138.png

 

 

 I realize this is a long winded explanation and I can provide additional context/information as needed... but how would I go about starting something like this or is it even possible?

 

 

0 Kudos
Reply
2 Replies
philipplucas
Automation Master
Automation Master

Re: Restricted Date Selection

Hi Alexie,

 

where are pending requests for a user stored? I think you somehow need to query all pending requests when a user submits the form (or already if a date is selected). Then you need to compare the chosen time period with all pending requests and see if it's available.

 

Depending on where your pending requests are coming from I'm not sure if this is possible without using additional logic (javascript). Would javascript be an option for you?

 

 

 

0 Kudos
Reply
Alexie_Rose
Canvas Initiate

Re: Restricted Date Selection

Hello Phillip,

 

Thank you for your response! The pending requests are stored within a list in SharePoint that will be updated with a workflow when a user submits a new request (which I haven't gotten to yet because I haven't finished the form).

 

I've managed to achieve what I was looking for using several calculated fields, but the form is running extremely slow. I assume that's from the multiple hide rules and calculated fields I have configured.

 

Unfortunately I know nothing about JavaScript or how I would go about implementing if provided a solution. Does that work with the responsive layout or would I need to switch? And would using the JavaScript format help the form run faster at all?

 

0 Kudos
Reply