I've perused the other similar issues on the community, but no luck yet.
Basically, I am pulling a field from the same feature layer that the survey is connected to -- so that I can let the submitter know whether that ID (entered, not global or object) has already been used. I am attaching the .xslx form, and the layer it connects to should be publicly available.
When I submit a test form in Survey123 Connect, it works as expected (first image). When I open it in the web application there are multiple things wrong (second image):
1) the note question that should only be relevant if that ID already exists is showing up anyways
2) the calculation fields are showing up blank, no matter what I put in.
I have tested this against with the pulldata(@layer) against other hosted feature services with the same IDs that are not connected, same result.
Here is the survey link from the form I published if it helps
On the note field I would check against the match_id field for relevant instead as there is no reason to call pulldata twice. The webform does temp to run calcs in a different order than the app. pulldata tends to be last.
In match_id you seen to be missing a comma pulldata("@json"Nocommahere${match_calc},"attributes.EMAC_ID")
Test that first.
@DougBrowning I added the comma and changed the relevant, but still the same results when I republish.
Are you logged in on the browser?
Maybe try a relevant on the json pull that the pulldata above is not empty.
@DougBrowning I've tried both logged in and logged out. I added a relevant on the json and the result is just that the match id field doesn't show up in the browser. Same result
mmm I wonder of the json is really long. I have seen that. set the bind esri length to something big like 1000 chars
Also try setting a relevant on match_calc where EMAC_ID is not empty or string length > 0
If all of that does not work set a calculation mode of always on match_calc just to see.
@DougBrowning Unfortunately no luck on any of those.
I dont use this much but this example has a concat?
pulldata("@layer", "getValue", "attributes.TotalCount", concat("https://services5.arcgis.com/jMCHJcLe13FaKCFB/arcgis/rest/services/US_Counties/FeatureServer/1", '?outStatistics=[{"statisticType": "count","onStatisticField": "objectId","outStatisticFieldName": "TotalCount"}]'), concat("STATE_NAME = '", ${state_name}, "'"))
@DougBrowning After all that, it was a setting in the hosted feature layer. It was shared publicly, but it didn't work until I allowed editors to see all features & anonymous editors having the same rights as signed in editors.