|
POST
|
Don't worry jborgion , this will probably happen again in the future. It has happend to me countless times and when I have errores in my expressions it is the first thing I look for.
... View more
06-10-2020
03:36 PM
|
1
|
0
|
2967
|
|
POST
|
Hi Joe Borgione and Karina Livingston , I guess you could use something like the expression below (this will only return a value when both attributes are not empty): if (!IsEmpty($feature.LOCATIONID)) {
if (!IsEmpty($feature.EQUIPMENTID)) {
return $feature.LOCATIONID + "-" + $feature.EQUIPMENTID;
}
}
Some reasons why Joe's code did not work is: When using a variable it should always be declared: so line 1 should be var joinChar = "-" When using if the condition should always be inside brackets. For Karina's expression, it is important that you access the attributes using either $feature.FieldName or $feature["FieldName"]. It is not possible to use [FieldName] in Arcade.
... View more
06-10-2020
01:35 PM
|
2
|
2
|
2967
|
|
POST
|
Hi Michaila Musman , Here is a support article about setting up related table for use in Collector How To: Set up related tables for use in Collector for ArcGIS And here a blog post from back in 2015 when they introduced the functionality of editing related data: https://www.esri.com/arcgis-blog/products/field-mobility/field-mobility/related-tables-exploring-new-ways-to-use-collect… What I would probably do is create a table with fields for the date/time, the fieldworker name and probably the status of the tree so you can monitor those through time. I assume if editor tracking is enabled on the table, it will automatically record data time and the fieldworker. You can use Arcade to show the last time the tree was watered and some statistics about how many times in the last x week or months. If you need any help with that just let me know.
... View more
06-10-2020
08:05 AM
|
1
|
1
|
5337
|
|
POST
|
Hi Michaila Musman , That was what I expected. In that case the geometry does not change, and you are interested in maintaining a history of when the trees were watered. We have implemented similar workflows for a client and ended up using a 1:n related table to store the history. When doing this it will affect the way you can interact with the data. It is a little harder to visualize data based on values stored in a related table.
... View more
06-10-2020
07:21 AM
|
0
|
5
|
5337
|
|
POST
|
Hi Administrátor Jihlava , Thanks for clarifying that you need to have a continuous range of values. It is important to realice that your current Arcade expression will not do that. It will take the highest number and take the next number. If any intermediate value will be deleted this will remain a gap. To get the first available number is to use something like this (I did not test it so it probably will need some tweaking): // use any additional logic before this
var stanoviska = OrderBy(FeatureSetByName($datastore,'gisdata_sde.gis.UUP_zavazna_stanoviska_p',['cislo'], true), 'cislo ASC');
var i = 1; // specify where the cislo code starts, I assumed 1
for (var f in stanoviska) {
cislo = f.cislo;
if (cislo > i ) {
return i;
}
i++;
}
... View more
06-10-2020
07:15 AM
|
0
|
0
|
1580
|
|
POST
|
Hi mmusman_CaseyTrees , I am glad it works. Could you mark the post that answered your question as the correct answer? Thanks!
... View more
06-09-2020
03:46 PM
|
0
|
0
|
4724
|
|
POST
|
Hi mmusman_CaseyTrees , In you want to maintain the history of the edits, you might want to consider using a related table (assuming that the geometry does not change). This way you would be able to calculate the number of edits using a simple Arcade expression o the related records of a feature. As you have noticed when you have editor tracking enabled on the service, you will only have information about the create date and user and the last edit, but none about the intermediate edits. In Enterprise you would be able to use an attribute rule that records a record of what change has been done by what person and at what moment in time. This is not currently available in AGOL. Maybe you can explain a little more about what type of data you have and why multiple fieldworkers are changing the data. This might provide some insight to your specific use case and could help to detect other alternatives.
... View more
06-09-2020
03:45 PM
|
0
|
7
|
5337
|
|
POST
|
Hi valerie.squire_slcgov , If it is a single URL you could obtain the URL in an Arcade expression and use a custom HTML configuration of the pop-up to create the URL link with the text that you want.
... View more
06-09-2020
03:39 PM
|
0
|
0
|
948
|
|
POST
|
Hi Jana Košábková , In this specific case I would recommend to contact Esri Support to have them check what is happening. I have not seen this behavior before, and it almost looks like two requests are made when using a WAB. I am also wondering why you don't make use of a database sequence: Create Database Sequence—Data Management toolbox | Documentation then you can use Arcade to get the next number from the sequence. In this link you can see how it is used in combination with the NextSequenceValue function Attribute rule script expression examples—Geodatabases | Documentation
... View more
06-09-2020
06:40 AM
|
0
|
0
|
1580
|
|
POST
|
Hi OakdaleGIS , This is due to the fact that the newline is not supported yet. This will come in the near future.
... View more
06-08-2020
06:17 AM
|
0
|
1
|
4703
|
|
POST
|
Hi Dan Patterson , So the language is kind of proprietary, although it leans heavily on a subset of JavaScript. It really lives in the ArcGIS ecosystem rather than just in the Pro ecosystem. I can imagine that not being able to use Python at the same places you can use Arcade limits the possibilities, but I understand that one of the reasons for introducing Arcade was being able to have something "light" yet powerful expression language that could be used across the platform no matter if you use it in desktop, web or inside mobile apps. There is still a long way to go to get there achieving the same support no matter what device or app you use, but that is where it is heading and from what I understand and Python would not have been the best way to achieve that. But this is my interpretation and not an official statement.
... View more
06-05-2020
04:24 PM
|
0
|
1
|
14562
|
|
POST
|
Hi OakdaleGIS , Can you confirm that you used the exact same expression that I posted? If I look carefully at the result below, it would mean that the expression is executed only partially, since there should be a blank line between "RESIDENT" and ", MN".
... View more
06-05-2020
02:10 PM
|
0
|
0
|
1586
|
|
POST
|
Hi Kelly Armstrong , Thanks for sharing the link, but it seems that the server is not responding. Also thanks for confirming that the field is indeed string. The problem with spaces is that they are difficult to detect visually. If there is a space we could use Trim function to strip them from the field before testing if it is empty. That would change the expression like this: if (IsEmpty(Trim($feature["building_number"]))) {
return "";
} else {
return "Resident" + TextFormatting.NewLine +
Concatenate([$feature["building_number"], $feature["street_name"], $feature["street_type"], $feature["street_direction"]], ' ') +
TextFormatting.NewLine + $feature.city + ", " + $feature.state;
} If indeed there is a string this could resolve the issue.
... View more
06-05-2020
01:54 PM
|
0
|
4
|
1586
|
|
POST
|
Hi jborgion , He is using the same approach as I mentioned at the end of my initial answer (check for the count after using a filter), although his rule is properly formatted as a validation rule.
... View more
06-05-2020
07:08 AM
|
1
|
0
|
3859
|
|
POST
|
Hi Joe Borgione , Thanks for the additional explanation on your use case. You are right, scrolling through a long list of street names is not very user-friendly. If you would have the area subdivided in areas, you could use contingent values to reduce the list of streets based on the area selected by the user.
... View more
06-05-2020
07:06 AM
|
1
|
0
|
3859
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-09-2020 09:26 AM | |
| 6 | 12-20-2019 08:41 AM | |
| 1 | 01-21-2020 07:21 AM | |
| 2 | 01-30-2020 12:46 PM | |
| 1 | 05-30-2019 08:24 AM |
| Online Status |
Offline
|
| Date Last Visited |
4 weeks ago
|