Nintex Forms 2016 for SharePoint
I have a form where the user selects a Location from a dropdown list, and then they are presented with the results of several lookup() functions that describe the Location. In particular, the form displays PreviousServiceDate and NextServiceDate for the selected Location.
Upon opening the form he lookup() boxes are blank until a Location is selected. When making the 1st Location selection, both PreviousServiceDate and NextServiceDate are incorrect. Upon selecting a 2nd Location the date calculations work correctly, and for all subsequent selections while on the form. It is like the runtime functions do not activate until the 2nd selection is made.
Here's how my functions work:
Location is selected: Choice dropdown
ServiceSchedule is found: lookup("LocationInfoList","LocalName",Location,"ServiceSchedule")
MondayDefined: Calculated Value: date(22,04,2019,00,01)
DiffDays: Single Line Text Box: dateDiffDays(MondayDefined,Today)
For PreviousServiceDate:
Calculated Value: RoundDown7: round(((DiffDays/7)-0.5),0)*7
Calculated Value: PreviousServiceDate: dateAddDays(MondayDefined,RoundDown7)
If PreviousServiceDate = Today, dateAddDays(PreviousServiceDate ,-7)
...similar for NextServiceDate
The 1st selection of Location initializes the date calculations from MondayDefined and skips the dateAddDays() function. The 2nd selection prompts the dateAddDays() function.
Can anyone help me solve this bug so that the 1st selection initializes all runtime functions correctly?
Than you.
