I have an issue where I need to populate a field in one feature class (Building Permits) with data from another feature class (Building Inspections). The two layers share a key field for permit IDs (one field is lowercase and the other is uppercase). The Building Permit layer has a field called "Electric Amount." I would like to use a pull function in a survey linked to the Building Inspection layer to populate a question with data from the Electric Amount field if the permitids are found to match.
I wrote the following pull function to accomplish this, but the data continually fails to populate in the question even after I used a string conversion to handle the integers that are being pulled into a string field. The function doesn't throw any errors in Connect, but it also doesn't pull in any of the desired data when a form is opened.
string(pulldata("@layer", "ElectricPermit_Amount", "url", "https://services6.arcgis.com/cMgmhwu0L5CeOOoS/arcgis/rest/services/Department_of_Community_Development/FeatureServer/2", "where", "PERMITID='${permitid}'"))
I'm all out of ideas on this one. Can anyone tell me where I might be going wrong?