Select to view content in your preferred language

Pass globalid from dataset to embedded Survey123 form

1105
4
Jump to solution
02-01-2022 10:11 AM
GaryBowles1
Frequent Contributor

I have a dashboard that contains 2 separate datasets. One is from an embedded Survey123 form and the other is a SQL Server view. The SQL Server view contains the globalid and inspection information from the S123 form, plus it contains various header data from our production database. I am trying to make the embedded Survey123 form filter based on the globalid from the SQL Server dataset. 

Is this possible? 

Thanks,

--gary

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Okay, so to get this to work, the Embed widget needs to be set to individual features, pointed at the SQL View layer as its data source. That way, the various filters and such can act upon it. But you'll want some way to select single records, so you'll probably want a list or table widget of the features, with selections in that widget filtering the embedded form, too.

The embed would need its URL set to something like

your-S123-url?mode=edit&globalId={globalid}

 Note that the capital I on "globalId" is important.

- Josh Carlson
Kendall County GIS

View solution in original post

4 Replies
jcarlson
MVP Esteemed Contributor

Can you elaborate on the situation a bit? Are you trying to use this to edit existing data or add new records?

When you say you want the form to filter, do you mean something like "select feature from server view, see form for the matching S1232 record"?

- Josh Carlson
Kendall County GIS
0 Kudos
GaryBowles1
Frequent Contributor

Josh,

The embedded survey123 form will be used to review and edit data. The S123 data contains info about the inspection of a well pad and contains a 5 digit code for the pad. There is no other identifying info collected in the field ie. name, location, etc.

The SQL Server data contains the globalid from the S123 dataset and header data stored in our production database such as pad name, location, pad foreman, etc. that will be used as a filter in the dashboard to select the relevant data by the user. Once the user has selected the appropriate data, the Survey123 form will take the globalid from the SQL Server dataset and display the corresponding survey record. 

So far, no dice getting the S123 form to display the data. I am getting an error message stating "Editing in not possible because the globalid parameter has not been provided."

Thanks,

--gary

 

0 Kudos
jcarlson
MVP Esteemed Contributor

Okay, so to get this to work, the Embed widget needs to be set to individual features, pointed at the SQL View layer as its data source. That way, the various filters and such can act upon it. But you'll want some way to select single records, so you'll probably want a list or table widget of the features, with selections in that widget filtering the embedded form, too.

The embed would need its URL set to something like

your-S123-url?mode=edit&globalId={globalid}

 Note that the capital I on "globalId" is important.

- Josh Carlson
Kendall County GIS
GaryBowles1
Frequent Contributor

Thanks Josh. Working now.

--gary

0 Kudos