SRINFO returns Sampling Requirement information (start date, grouping, number required...) for a sampling Requirement ID/Name.
SRINFO(ID/Name, Field, optional ForDate, optional DateFormat, optional SearchForward)
ID/Name: The ID (SAMPLEREQ.ID field) or the Sampling Requirement name in quotes. Can be a number (i.e. 12), a cell reference (i.e. C2) to a cell that contains a number or string or a quoted string that is a Sample Requirement Name.
Field: The field to get:
- NumReq - Number Required
- Where Clause
ForDate: This is an optional parameter. The function by default looks up the Sampling Requirement for the Start Date of the report. A date string (i.e. "07/16/2014") or reference to a cell with a date in it, the sampling requirement will be used for this date.
DateFormat: The format that the date will be outputted. Only applies to date fields (Start Date, End Date, Group Start Date and Group End Date). See here for format explanation.
SearchForward: Set to 1 to Search, leave blank or zero (default) to only return data if a sampling requirement exists for the ForDate. If a sampling requirement is not found for the ForDate, search for the next Sampling Requirement after the ForDate. Example, if looking for the Lead and Copper Sampling Requirement and the next dates that have a requirement is not until 2022 it would return info about that future requirement if SearchForward is set to 1.
Use Locate Sampling Requirements Data to locate this formula is a spread report.
SRINFO(2,"NAME") - Returns "Dist Cl2", the name of the Sample Requirement with an ID of 2.
SRINFO("Dist Cl2", "GroupStartDate") - Returns 5/1/2019.