Solved! Go to Solution.
The id type only works for OID or FID. If you want to use select for other fields, you should use where clauses, For example in your case:
"WHERE UID =4,5,6,7", you can use
#data_s=where:<dataSource_ID>:UID%20IN%20(4%2C5%2C6%2C7)
And if you want to add another clause, you can use AND to concatenate them, just like any standard where clause does:
#data_s=where:<dataSource_ID>:UID IN (4,5,6,7) AND City = ’LA’
And please encode the data_s parameter value to make sure it work, like the following:
#data_s=where:<dataSource_ID>:UID%20IN%20(4%2C5%2C6%2C7)%20AND%20City%20%3D%20’LA’%20
Furthermore, if you're not sure how to write a SQL clause, you can use Select widget to set up a SQL expression. Here are the steps for your reference:
1. Add a table widget and create a sheet with the data you like (so you can see the result from URL parameters)
2. Add a select widget, choose Select by Attributes. Click Add new data and select the same data of that you chose for table
3. Click SQL Expression Builder to set up the clauses.
4. Save the app and go to preview. Click Attribute selection and enable the toggle appeared below.
At this time, you should be able to see the data_s with a where clause. You can try different SQL expressions to explore.
Hope this info can help as you explore URL parameters. Please come to us anytime you run into issues. thanks!
The id type only works for OID or FID. If you want to use select for other fields, you should use where clauses, For example in your case:
"WHERE UID =4,5,6,7", you can use
#data_s=where:<dataSource_ID>:UID%20IN%20(4%2C5%2C6%2C7)
And if you want to add another clause, you can use AND to concatenate them, just like any standard where clause does:
#data_s=where:<dataSource_ID>:UID IN (4,5,6,7) AND City = ’LA’
And please encode the data_s parameter value to make sure it work, like the following:
#data_s=where:<dataSource_ID>:UID%20IN%20(4%2C5%2C6%2C7)%20AND%20City%20%3D%20’LA’%20
Furthermore, if you're not sure how to write a SQL clause, you can use Select widget to set up a SQL expression. Here are the steps for your reference:
1. Add a table widget and create a sheet with the data you like (so you can see the result from URL parameters)
2. Add a select widget, choose Select by Attributes. Click Add new data and select the same data of that you chose for table
3. Click SQL Expression Builder to set up the clauses.
4. Save the app and go to preview. Click Attribute selection and enable the toggle appeared below.
At this time, you should be able to see the data_s with a where clause. You can try different SQL expressions to explore.
Hope this info can help as you explore URL parameters. Please come to us anytime you run into issues. thanks!
Hi @Shen_Zhang . Is there a way to automatically pan and zoom based on data_s=where? Let me explain myself, when I use data_s=id it automatically pan and zoom the ObjectID, but when I use data_s=where it won't do that.
Thanks in advance for any help
Zoom to feature by data_s where clauses is not supported yet, we're still working on it. Now you can use the zoom_to_selection=true parameter to zoom to a feature selected by id.