Yes.
You will need to use the pulldata("@layer") function for this. I attached an XLSForm example.
Notes:
- The pulldata function allows you to query a layer. You will want to query the inspection's layer with a query that looks something like this:
assetID='100' and inspectionDate BETWEEN CURRENT_TIMESTAMP - 15 AND CURRENT_TIMESTAMP
- For your pulldata query to work, your survey layer MUST allow the query operation
- The pulldata("@layer") function only works when you are connected (it will not work while offline)
To setup the XLSForm:
- Take the attached XLSForm, load it into Survey123 Connect and publish it
- Go into the item details page of the survey layer created by Survey123 Connect and make sure you enable queries in your surveys layer
- Get the URL of your layer and replace it in row 8 of yourXLSForm. Re-publish your survey and use either a web browser or the mobile app to add one or more records to test.
Hope it helps.