So I am having an issue with an auto file name and field when submitting a form.
The form created is for a process called a Request for information. I want to auto generate the next number in sequence for the filename/RFI Number. This works as long as there is an initial form already created:
max(RFI_x0020_Number[Originator_x0020_Company = OriginatorCompany]) + 1
I am pulling the RFI number from a column in a form library on sharepoint (RFI_x0020_Number) and filtering it based off the company that originated the request(Originator_x0020_Company). It pulls the next number in sequence using the max function and adds one. The issue is for the first form that is submitted by a contractor there is no data to pull the max RFI number (because no RFI form exists yet from that company) and I get an NaN. Is there a way to default it to 1 on a NaN to start the numbering sequence automatically?
I have attached the form for reference, the Field is the RFINum field.
Thank you for any help you are able to provide!