I'm using a slightly modified script from https://doc.laserfiche.com/laserfiche.documentation/12/userguide/en-us/content/process-field-ref-date.htm
const dateValues = LFForm.getFieldValues({ fieldId: 27 }); const dateAsArray = Array.isArray(dateValues) ? dateValues : [dateValues]; return dateAsArray .filter((d, idx) => idx !== field.index && d.dateTimeObj !== null && new Date(d.dateTimeObj).getTime() === date.getTime() ).length === 1;
to only allow dates that are in a table to be selected. The table would be hidden and populated by a stored procedure.
The code works if you manually add a date to the table, but if the table is populated via lookup rule, the code does not seem to pull in the dates. If you click into the table date field and re-select the date, the code will pull that individual date. You'd have to click on all the dates to get the date picker to filter correctly.
The goal is to have the code pull in the dates that are populated by a lookup rule and correctly filter the date picker.
Populated via lookup
Populated via manually selecting
Any help is appreciated!