DOC
|
I don't think you can have a JSON object inside a value of an object unless it's in an array but I might be wrong (can't test it at the moment to verify). Also, the line with difinitionExpression is missing a comma at the end. Shay.
... View more
07-07-2017
11:15 AM
|
0
|
0
|
19017
|
POST
|
Hello, i have an application with a geoprocessing tool widget which I tried to show an output message for the users once its finished. but every time it's done, the output text is Error. I've spent a few good hours, trying dozens of things to try and understand what the problem is. So eventually I got it sorted. I managed to find the solution and after so much frustration and attempts, I thought this might help someone in the future. I was extremely surprised to see no one have noticed this before tho. I found a few similar posts but not with the same issue. So I finally discovered that the output message text works perfectly on Chrome but not on Internet Explorer - the python script was fine! it was the application that didn't showed an output message. At first I left it aside, but since everyone in our office uses Internet Explorer, It was embarrassing to tell them to change their habbits just for that issue, so it was either open a bug in ESRI and wait who knows how many months or try and solve it on my own. In the Geoprocessing widget folder there is a file called resultRendererManager.JS There are a few calls in the file to a function called "includes" - this function is unsupported by Internet Explorer and Opera. I replaced them all with indexOf(s) >= 0 and now it all works perfectly fine. This is pretty much a bug of ESRI I believe. It cost me hours of investigation and frustrations I must say. Hopefully this post will help someone in the future. Regards, Shay.
... View more
06-29-2017
06:12 PM
|
1
|
2
|
1330
|
POST
|
Hello, I was wondering if anyone ever had this issue and find a subtle way to handle it. I have a webmap which contains a few services from the internet and the rest are local published web map services. Sometimes there might be network problems which makes the internet map services unavailable, but when the application loads, it takes forever to show an error about those services and it makes it almost impossible to continue loading the application.. Is there any solution for such thing besides waiting for the error and ingoring it? Thanks, Shay.
... View more
06-28-2017
07:29 AM
|
1
|
0
|
607
|
POST
|
That's perfect thank you! I guess I misunderstood Dan but this snippet helps a lot thank you.
... View more
06-14-2017
09:19 AM
|
0
|
0
|
6031
|
POST
|
Thanks but the degrees shown in this tool are different then what my users requires. I just need 0-360 degrees unit. Also, it doesn't show anything when drawing a simple straight line.. Maybe I'm using it wrong I don't know.. It doesn't looks like it's what I'm searching for see attached picture -
... View more
06-09-2017
11:29 AM
|
0
|
0
|
607
|
POST
|
Thank you Dan. I have only few lines to draw. Nothing big. Do you know if those COGO tools are available in Python? I could see how I can use it in my script. I'm sure people have functions for that already. I thought maybe someone will care to share some knowledge At first, I started writing the calculation but it's a lot of trigonometry and the mistakes I might do will cost more than my wasted time. Shay,
... View more
06-09-2017
11:22 AM
|
0
|
0
|
6031
|
POST
|
Hello, Anyone knows on an existing widget or simple way to add degrees/angle for the measuring/drawing tools on a WAB application? I found a different kind of degree unit in the eDraw or eMeasure widget. I'm referring to a simple 0-360 degrees unit. Regards, Shay.
... View more
06-09-2017
11:07 AM
|
1
|
2
|
1110
|
POST
|
Hello, In the last few days I've been working on a Python script that enables me to draw lines in a feature class. The script gets 3 params - starting point coordinates, angle (degree) and length in km. After a few hours of investigating for possible implementations, I've decided to drop the mathematical approach and use the pre-made tool called BearingDistanceToLine_management. My current implementation actually works but the designed is ridiculous! The tool requires two special tables! I have one table that holds the parameters - I actually do an InsertCursor into a table just for the tool to run! I have another table, which gets the output when the tool is finished. When the tool is done, I run a searchCursor on the output table, take the output shape data and adds it into a THIRD and final table where I can add my own other columns. Can anyone recommends a better solution? I have found many articles with a lot of math lessons but no clear solid answer how to do it. I can't waste my time on learning trigonometry for this and pretty surprised ESRI doesn't have a simple pre-made function for that. Thanks, Shay.
... View more
06-09-2017
10:54 AM
|
1
|
6
|
14595
|
POST
|
So surprisingly, just when I dedice to post a long help request after spending SO much hours on this problem, suddently I find the solution by myself I hope it will help others, I think this ability is extremely important and helpful when creating a real-time application in any kind of organization! So here is my final result: - One full layer of all incidents - A filter widget with 5 pre-made filters: Incidents of Today, All open Incidents, Incidents between dates, incidents by keywords*2 - Filter widget shows-up on startup of the application - In the PostCreate function of the Filter Widget I apply the first filter (all of today's incidents) - The user can choose to turn that filter off and/or use other filters, such as dates and keyword search. With no previous knowledge or basic understanding of how the code works this might get a bit messy and confusing.. I hope it will make sense to whoever finds it relevant. How to implement: * Create a date filter with the WAB that just simply filters the layer by a specific date (any date). * To be able to run the filter on startup on the widget, the filter SHOULD NOT have an interactive parameters option. * To enable the filter when the widget is opened, insert the following code inside the PostCreate function of the Widget.js file in the Filter widget's folder- if (filterObj.name === 'NAME OF THE FILTER AS DEFINED IN THE WIDGET SETTINGS'){ query('.header',node)[0].click(); } * Open the Filter configuration file (usually located in the following path - C:\Program Files\ArcGIS\WebAppBuilderForArcGIS\server\apps\*APPID*\configs\Filter\ ) and find the targeted filter you created on the first step. If you followed the steps correctly, you should find a field named "expr" TWICE for this filter. Just replace the existing value with the following syntax - "your_datetime_field >= CURRENT_DATE()-0.5". * I've tried using SQL functions such as GETDATE and DATEADD and such which are not supported... apparentaly CURRENT_DATE works perfectly and -0.5 is a must for today's records. When using -1 I get records for 2 days. Overall it's a bit hard to explain but hopefully it was clear enough. Regards, Shay.
... View more
05-29-2017
07:39 AM
|
1
|
1
|
2044
|
POST
|
Hello, I have a WAB application which is used by a helpdesk team and it shows a layer that contains a lot of incidents. At the moment I have 2 different layers for them in the webmap. One layer contains all incidents regardless the type of information. Another layer is already filtered through the MXD to show only last week's incidents. Aside those two layers, I've added the filter widget to enable them to filter the complete layer (which is not shown by default at startup). This situation of two similar layers causes a lot of confusion and not user friendly! I want to enable them to have only ONE single layer which is filtered by default to show only TODAY's incidents. Robert Scheitlin, GISP was extremely helpful to show me how to start the app with the filter enabled! But when I have a datetime filter which asks for parameters.. it becomes impossible to initialize that filter on startup + I cannot find any way to have the filter's date value dynamic for today's date. So for a dynamic date of today I can find a workaround.. a HORRIBLE one but it's better than nothing - Run a script every night to inject today's date in the configuration file on the filter widget. But.. because I cannot initialize this filter on startup of the widget.. it does not help me show a filtered layer.. It takes an extra click from the user each time the application starts and it's just not right. I tried using the Enhanced Query widget but it does not know functions such as GETDATE().. I also tried do "convert(date,GETDATE())". I found a great article to show how it's possible to filter a webmap layer dynamically with dates (by Jake Skinner - https://community.esri.com/docs/DOC-8191, which then GETDATE() do works! but that same technic does not work on the widget. I also tried the enhanced search widget of Robert, but when running the SQL statement, my browser just freeze to death This is so basic for a filter widget! I'm shocked to see it does not exists or so complicated to achieve! despite the fact it's an SQL statement! Can anyone think of a better solution please? Let me just emphesis that the layer cannot be filtered through the webmap or the MXD project, because the user should have the option to change the filter and investigate the rest of the records. Regards, Shay. P.S. I just notice it might be a similar post to Toni Sevenius https://community.esri.com/thread/76651
... View more
05-29-2017
06:43 AM
|
0
|
3
|
4457
|
DOC
|
This is great! I just wish it was possible to do in the Filter Widget so that the user could cancel or change it Shay.
... View more
05-29-2017
01:05 AM
|
0
|
0
|
19017
|
POST
|
Great thanks a lot Robert. I highly appreciate all your help. I hope you don't mind me asking, there is another small issue I'm having with this solution - the filter widget does not allow a default parameter of a CURRENT date. I found the configuration file and it's all JSON based... which means I cannot insert a function to get the current date and inject it as a parameter. have you ever got to deal with a work around for this? I'll probably use your filter widget instead of the built-in filter widget since I want the filter results to be available as a new layer. Otherwise, the filter get cancelled when the filter widget is closed. Shay.
... View more
05-25-2017
12:45 PM
|
0
|
2
|
1482
|
POST
|
Robert, Thanks for helping! I Just duplicated line 67 in the screenshot above and the instance came back but then it falls on a different function of finding a layer's info. I did a debug on the code when I apply a filter with the widget and then of course it happens perfectly fine. as from what I understand, the code I'm trying to insert is in the wrong spot... Could you guide me where should I put the code exactly? is this the right file for it?? where can I inject my own code after the app has loaded succefully?? Shay.
... View more
05-25-2017
02:01 AM
|
0
|
7
|
1483
|
Title | Kudos | Posted |
---|---|---|
31 | 07-17-2023 01:12 PM | |
1 | 03-14-2016 09:14 AM | |
1 | 03-21-2016 10:18 AM | |
1 | 05-29-2017 07:39 AM | |
1 | 09-23-2015 09:15 AM |
Online Status |
Offline
|
Date Last Visited |
08-25-2024
12:53 PM
|