|
POST
|
Hi sjohnson_CityofLubbock , The most important thing is that you made it work. But indeed, it is strange that it would change after copying. Let me know if you run into any problems and we'll see if we can figure it out.
... View more
07-27-2020
04:47 PM
|
0
|
0
|
6753
|
|
POST
|
Hi Nathan Earle , If you have a single point feature that is related to multiple records in a table you can use Arcade to sort and structure the information. If you want me to help you with this, you can create a group in ArcGIS Online, share the content (or a portion of it) to that group and invite me using my username "xbakker.spx" and I will see what is possible.
... View more
07-27-2020
02:01 PM
|
0
|
1
|
2688
|
|
POST
|
Hi Nathan Earle , Can you elaborate a bit more about why you choose to have multiple points at the same location in stead of for instance having a single point that is related to multiple records in a related table? Maybe you have a good reason for doing this, but it may not be the best way to structure your data. You mentioned Arcade (you tried everything except Arcade). Arcade is able to extract the information from that location and structure the data in a single pop-up sorted in any way you want. However, you do not want to do this on multiple points at the same location. It would have to do a query for each of the clicked points (you have multiple at the same location) and that would make the process redundant and slow. As far as I know, you don't have control on the order in which the pop-ups are presented.
... View more
07-27-2020
01:52 PM
|
0
|
3
|
2688
|
|
POST
|
Hi sjohnson_CityofLubbock , Is it possible to share the expression you have so far and he configuration of the pop-up?
... View more
07-27-2020
01:44 PM
|
0
|
2
|
6753
|
|
POST
|
Hi Kieren Tinning , Thanks for the additional explanation. What you want to do is configure an attribute rule on the address table that is triggered by insert, update and delete. This way you can use the new situation to modify the building numbers on the other featureclass.
... View more
07-26-2020
07:58 AM
|
0
|
0
|
2296
|
|
POST
|
Hi KierenTinning , Thanks for the clarification. Have you looked at "Message notification direction" in Relationship class properties—Relationships and related objects | Documentation ? It may provide what you need by deleting related records when the parent is deleted.
... View more
07-24-2020
12:27 PM
|
0
|
2
|
2296
|
|
POST
|
Hi KierenTinning , I have not seen the possibility to delete records using an attribute rule. Can you elaborate a bit more on what your workflow looks like? You can use a delete action as trigger for an attribute rule to run. You may also want to explore the deletion semantics, since this looks like a cascading delete that you need.
... View more
07-24-2020
07:44 AM
|
1
|
4
|
7050
|
|
POST
|
Hi sallygal2004 To provide a visual example of applying the solution above,this is what you can get:
... View more
07-24-2020
06:08 AM
|
0
|
0
|
3269
|
|
POST
|
Hi JosephLivoti , A solution was provided at this post: Conditional Field display with Arcade in Pop Ups (revisited) (scroll all the way down). To make it easier to find for others, see the answer below: You can use a single expression which reads out all the information and presents the result. The thing that you can't do is apply any formatting at different parts of the result. In you example you have expression single underlined and all expressions in bold. So, I think it might be better to adjust what you already have. The individual expressions would become: IIF(isEmpty($feature.status14), "", TextFormatting.NewLine + "Footer")
IIF(isEmpty($feature.status14), "", TextFormatting.NewLine + "Status")
IIF(isEmpty($feature.assignedto14), "", TextFormatting.NewLine + "Inspector")
IIF(isEmpty($feature.other14), "", TextFormatting.NewLine + "Other Inspector")
IIF(isEmpty($feature.date_approved14), "", TextFormatting.NewLine + "Date Approved")
IIF(isEmpty($feature.notes14), "", TextFormatting.NewLine + "Notes")
IIF(isEmpty($feature.status15), "", TextFormatting.NewLine + "Foundation")
IIF(isEmpty($feature.status15), "", TextFormatting.NewLine + "Status")
IIF(isEmpty($feature.assignedto15), "", TextFormatting.NewLine + "Inspector")
IIF(isEmpty($feature.other15), "", TextFormatting.NewLine + "Other Inspector")
IIF(isEmpty($feature.date_approved15), "", TextFormatting.NewLine + "Date Approved")
IIF(isEmpty($feature.notes15), "", TextFormatting.NewLine + "Notes") ...and the text in the pop-up would become a single line like this: {expression/expr5}{expression/expr0} {status14}{expression/expr1} {assignedto14}{expression/expr2} {other14}{expression/expr3} {date_approved14}{expression/expr4} {notes14}{expression/expr6}{expression/expr7} {status15}{expression/expr8} {assignedto15}{expression/expr9} {other15}{expression/expr10} {date_approved15}{expression/expr11} {notes15} In case a field is empty the expression will detect it and return an empty string which you wont see and which does not take up an empty line.
... View more
07-24-2020
05:43 AM
|
0
|
0
|
2871
|
|
POST
|
Hi Kieren Tinning , Glad to hear that it is working now. If you included the GlobalID in the return object you are probably updating a single feature. In the help there is an example that shows how to update multiple features. See: Attribute rule script expression examples—Geodatabases | Documentation (Edit another featureclass). There you will see this example: var fsAddress = FeatureSetByName($datastore, "Address_pnts", ["globalid"], true)
var fsListAddpnts = Intersects(fsAddress, $feature)
var AddList = []
var counter = 0
var noAddress = Count(fsListAddpnts)
if (noAddress > 0) {
for (var address in fsListAddpnts) {
AddList[counter] = {
'globalid': address.globalid,
'attributes': {
'add_district_name': $feature.DistrictName
}
}
counter++
}
return {
'result': noAddress + ' addresses found in the district.',
'edit': [{
'className': 'Address_pnts',
'updates': AddList
}]
}
} else {
return 'No address points in district.'
} The key in this example is the AddList, which contains a array of objects that need to be updated. Each element in the array is an object with a globalid property filled with the globalid of the feature in the other featureclass that needs to be updated and an attributes property that contains another object where each attribute name is assigned a value (in this case there is only a single attribute called "add_district_name" that contains the name of the district of the intersecting feature). Could you post your final expression so that other can see how you solved it?
... View more
07-24-2020
05:38 AM
|
1
|
6
|
7050
|
|
POST
|
Hi KierenTinning , For testing in the pop-up I would probably first use something like this: var tbl = FeatureSetByName($datastore,"DB.LAND.NonCustomerAddress");
var fc = FeatureSetByName($datastore,"DB.LAND.Premise");
var premiseKey = $feature["GlobalID"]; // replace with an existing GlobalID from the table
var nonCustomerSql = "GlobalID = @premiseKey";
Console(nonCustomerSql);
var nonCustomerAddressResult = Filter(tbl, nonCustomerSql);
Console("Count:" + Count(nonCustomerAddressResult));
var txt = "";
if (Count(nonCustomerAddressResult)>0) {
for (var address in nonCustomerAddressResult){
txt = txt + address.building_number + ',';
//premiseKey = address.premiseguid;
Console(" - building_number:" + address.building_number);
Console(" - txt:" + txt)
Console(" - premiseguid:" + address.premiseguid)
}
}
return txt; ... and check the messages that are written to the console.
... View more
07-23-2020
05:32 PM
|
1
|
9
|
7050
|
|
POST
|
Hi Kieren Tinning , Would I still use $map in the attribute rule? No, $map is not available for attribute rules. They are executed at the database level and at that level there is no knowledge about any map. I also recommend using the $datastore in the pop-up to be closer to the actual situation you want to solve. Also, the $feature here is referencing the point I clicked, however in the attribute rule it's actually reversed as it would be from the table to the feature? That changes things a bit. You will have to use a default value for the table record to simulate the process. Instead of using var locationeguidKey = $feature["locationeguid"]; You should assign an existing "loctioneguid" value from your table to ensure that you can simulate the process. As for the SQL, I am using it as I need to roll up all of the values from the table and then write them to the the feature in a comma separated list. The SQL will not work the way you configured it. Verify if you can use FeatureSetByRelationshipName function and if not, change the sql using the example I provided before. Either use this: var nonCustomerSql = "premiseguid = @premiseKey";
var premiseSQL = "GlobalID = @premiseKey"; ... or: var nonCustomerSql = "premiseguid = '{" + Upper(premiseKey) + "}'";
var premiseSQL = "GlobalID = '{" + Upper(premiseKey) + "}'";
The following line will not work: txt = txt + Text(address.building_number, ','); If the building number is numeric then you will have to use the Text function to convert it to text (applying any formatting you want) and concatenate it with the comma. txt = txt + Text(address.building_number) + ','; The line: premiseKey.labeltext = txt; ... will result in an error, since premiseKey is a GlobalID and does not have a property "labeltext".
... View more
07-23-2020
05:24 PM
|
0
|
0
|
2296
|
|
POST
|
Hi Kieren Tinning , A couple of things to start with: If the data is related through a relationshipclass, use the "FeatureSetByRelationshipName" to access any related data. If that is not the case, keep in mind that a valid sql expression to filter the data on global id requires son additional formatting. Example: var sql = "parentglobalid = '{" + Upper(code) + "}'"; However, I think it should be possible to use: var premiseSQL = "GlobalID = @locationeguidKey"; I would take out the if statement that is within the return statement and place it before the return In the for loop you are accessing a variable called "nonCustomerAddressResult". I suppose that should be "CustomerAddressResult" In the for loop you overwrite for each address the value you assign to variable txt. If you just need a single adress,just use the First (and check if you have any results). Try the expression for instance in a pop-up and return the txt variable to see if it gives any results. If you have the correct value assigned to the variable txt we will see the next step to write the value to the output.
... View more
07-23-2020
03:29 PM
|
1
|
13
|
7050
|
|
POST
|
Hi Sally Galewski , In ArcGIS Online, you cannot return font formatting or colors in a single Arcade expression. You can use the expression that you already had and use custom HTML formatting in the pop-up using another arcade expression. The first continues to return the value you calculate, the second returns the color code to be applied to the text depending on the value calculate. The HTML for your pop-up could look like this: <p style="color:{expression/expr1};">{expression/expr0}</p> .. in this example the expression 1 will contain the color code: var Hcalc = (($feature.ItemA / $feature.ItemB) * 200)
if (Hcalc > 10) {
return "rgb(255, 0, 0)";
} else {
return "rgb(0, 0 , 0)";
}
... View more
07-23-2020
11:43 AM
|
1
|
1
|
3269
|
|
DOC
|
Hi Joe Livoti , As I mentioned before there will be functionality in the near future to determine the visibility of a field using Arcade. I do not have any specifics at this moment about how this will work. In ArcGIS Pro you can create HTML and return it in an Arcade expression and it will visualize as you want. In ArcGIS Online, this is not possible yet, however, it is on the road map, since compatibility between the different components of the platform is very important. Currently, when you create html code in an Arcade expression in ArcGIS Online, it will be interpreted as plain text.
... View more
07-23-2020
08:16 AM
|
0
|
0
|
51206
|
| 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 |
3 weeks ago
|