完了していない停止を日付で表示するフィルターを設定することは可能ですか?開始日時と終了日時があります。期限切れの停止を非表示にしたいと考えています。yes/noの新しいフィールドを作成してその方法でフィルターをかけることも考えましたが、ユーザーが戻って入力する手間を避けたいです。完了日以降の結果を自動的に非表示にしたいのです。これは可能でしょうか?<\/P>
<\/P>
ありがとうございます!<\/P><\/BODY><\/HTML>
Oh, you need to modify the json that makes up the webmap manually, the UI does not allow you to specify this query. The AGO-Assistant can help. Just be careful, it is easy to mess the json up.
Ok, thanks. One of my feature services I am in control of and know that the database is SQL Server and the fields are date fields. This one does show the date fields in the filter window. However it doesn't let me add an expression in the value field. Where would I add the expression above in a web map filter window?
Also, another feature service that I use but am not in control of has date/time fields but I'm unsure of what database format it is in. The date/time fields do not show up in the drop down in the filter window. Why would that be?
Thanks!
The syntax I provided above is for SQL Server and ArcGIS Online hosted data. If you use a different database, you will need to determine the syntax for that database, You will also need date fields so enable editor tracking is one way to get these.
Does this only work with Hosted Feature services then? I have a feature service I have added to AGOL from a local ArcGIS Server. The date fields don't show up when I try and create a filter.
For Hosted services, if you allow non standard queries, you can use the sql server date syntax. Here is an example that will only show feature created in the last 30 seconds.
DATEDIFF(s,DATEADD(s,30,CreationDate),GETDATE()) < 0
That should work, thanks! I think I was trying to over complicate it.
Is there way to set a filter; using a date query of date>=5/1/2015, during the [create replica] process within the REST services of ArcGIS Online!?
You can set filters on your layer and use dates in these filters like: Date "is not between" Date a & Date b. Or if you had a field that has the expired domain(yes/no) you can use that which might work for your setup if the expired date could be a different value for each feature on the map.
Hope this helps.
Russ
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.