Hello, I recently started working with infopath/sharepoint and my first task was to create a digital sign in sheet for the front desk. The form I created has two ways to sign in. The first way, which functions as it should with no issues,
is where the user manually types in their information and this info is then stored on a sharepoint list. The second way, which I am having trouble with, is where infopath pulls data from an event from the standard built in sharepoint
calendar app and the guest would select their name from a drop down list of appointments and then infopath autofills their data by pulling info from the event and submits it.
The trouble I have run into is that I was asked to only have names show in the drop down list if their appointment was close to the time they arrive to check in, I have it at plus/minus 15 minutes for their name to show up to pick.
I accomplished this by setting a filter in the drop down box to get names when their start_time data field satisfies: start_time > addSeconds(now(), -900) and start_time
The form is supposed to just be left out, so the user shouldn't have to refresh it to find their name. The issue is that if the form is, say opened at 1:00 pm, and someone comes in at 1:30 pm, with an appointment at 1:30 pm, his name wont
show up when they go to the drop down list. But if they were to refresh the form and and check again their name would be on the drop down list.
However, if the form was opened at 1:00 pm and someone came in at 1:05 pm with an appointment at 1:10 pm, their name would show up on the drop down list.
Basically their name only shows up if it follows the parameter of being in plus/minus 15 minutes from when the form is opened, but if the form is left open and someone goes to check later on when their event would be in the time
frame, it won't show up.
I have the form set to re-query the data when the user clicks the button to take them to the view where they select their name in the drop down list, and if I removed the restriction that there was a time window on when the event
could be and add an event, the new event does show up since the data was gotten again before checking the list.
I may be wrong but it would seem the issue is the now() function in the addSeconds, where it seems like the now() value is only what it is when the form is opened, and doesn't change as time goes on to check for newer events that
fit the parameters.
Does anyone have any ideas on what I could do to fix this issue of the new events not showing up when they are supposed to? I can provide screenshots of the infopath form and filters and all if needed. Thanks!
Edit: After posting this, I checked and had the form output the now() value to a column and checked that it was working correctly and outputting the correct time, so I suppose that is not the issue