BLOG
|
Hello @Jesan90 I have this code but I am getting error of Token. Basically, I want user type scooter ID and get some information from survey for example vehicle_company or etc. function returnFeatures2(ID,Token){
var xmlhttp = new XMLHttpRequest();
var token = Token // This is a field token calculation
var url = "https://services.arcgis.com/****/ArcGIS/rest/services/-*****/FeatureServer/0"
+"query?where=vehicle_id"
+ ID // The parameter filter
+ "%27&objectIds=&time=&resultType=none&outFields=*&returnHiddenFields=false&returnIdsOnly=false&returnUniqueIdsOnly=false&returnCountOnly=false&returnDistinctValues=false&cacheHint=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&having=&resultOffset=&resultRecordCount=&sqlFormat=none&f=pjson"
+ "&token=" + token
xmlhttp.open("GET",url,false);
xmlhttp.send();
if (xmlhttp.status!=200){
return "Error1"
} else {
var outValue = xmlhttp.responseText;
}
return outValue;
}
... View more
01-14-2022
12:33 PM
|
0
|
0
|
4303
|
BLOG
|
Hey @HelenZhou Could you send your steps specially JS code and how to link to another hosted service? I couldn't find any code sample.
... View more
01-13-2022
08:58 AM
|
0
|
0
|
4330
|
POST
|
Hello, In first survey I have ID number question which user type. In 2nd survey I want user to type ID and bring all information from first Survey which they type ID on that. I know I can do this by JaveScript and pulldata but I don't know JS. basically, I need users put ID number and then all info from first survey show on 2nd survey. I appreciate if I have step by step instruction with JS code. Thanks
... View more
01-12-2022
12:33 PM
|
0
|
6
|
2989
|
BLOG
|
Hello, In first survey I have ID number question which user type. In 2nd survey I want user to type ID and bring all information from first Survey which they type ID on that. I know I can do this by JaveScript and pulldata but I don't know JS. basically, I need users put ID number and then all info from first survey show on 2nd survey. I appreciate if I have step by step instruction with JS code. Thanks
... View more
01-12-2022
10:43 AM
|
0
|
0
|
4370
|
POST
|
Hello I have this code to get all Race from living atlas but this arcade give me error. I am trying to use it on pop up. I don't want to bring layers to webmap and I just want to use FeatureSetByPortalItem Error Execution Error:Runtime Error: Cannot call member property on object of this type. B03002_003E //intersect to determine population density in the tract
var portal = Portal("https://www.arcgis.com")
var popu = FeatureSetByPortalItem(Portal,
"23ab8028f1784de4b0810104cd5d1c8f",2,
['B03002_003E','B03002_004E','B03002_005E','B03002_006E'
,'B03002_007E','B03002_008E','B03002_009E','B03002_012E']
, true);
var fields = [
{ value: $feature["B03002_003E"], alias: "White Alone, not Hispanic" },
{ value: $feature["B03002_004E"], alias: "Black or African American Alone, not Hispanic" },
{ value: $feature["B03002_005E"], alias: "American Indian and Alaska Native Alone, not Hispanic" },
{ value: $feature["B03002_006E"], alias: "Asian Alone, not Hispanic" },
{ value: $feature["B03002_007E"], alias: "Native Hawaiian and Other Pacific Islander Alone, not Hispanic" },
{ value: $feature["B03002_008E"], alias: "Some Other Race Alone, not Hispanic" },
{ value: $feature["B03002_009E"], alias: "Two or More Races, not Hispanic" },
{ value: $feature["B03002_012E"], alias: "Hispanic or Latino" }
];
// Returns the predominant category as the alias
// defined in the fields array. If there is a tie,
// then both names are concatenated and used to
// indicate the tie
function getPredominantCategory(fieldsArray){
var maxValue = -Infinity;
var maxCategory = "";
for(var k in fieldsArray){
if(fieldsArray[k].value > maxValue){
maxValue = fieldsArray[k].value;
maxCategory = fieldsArray[k].alias;
} else if (fieldsArray[k].value == maxValue){
maxCategory = maxCategory + "/" + fieldsArray[k].alias;
}
}
return IIF(maxValue <= 0, null, maxCategory);
}
getPredominantCategory(fields);
... View more
12-03-2021
08:28 AM
|
0
|
1
|
1854
|
IDEA
|
@AbdoulayeDiop Could you share your Arcade code? I am trying to do same thing but couldn't find solution.
... View more
11-23-2021
08:31 AM
|
0
|
0
|
2679
|
POST
|
Hello I think instant apps have problem today. I can't publish and also I can't choose another basemap for switch basemap.
... View more
11-09-2021
07:19 AM
|
0
|
1
|
313
|
POST
|
Hey @jcarlson Thanks for this this is great but I know some arcade code doesn't allow you to create actions. is it normal or I need to change the code to enable Action.
... View more
11-08-2021
06:42 AM
|
0
|
0
|
498
|
POST
|
Hello, I am trying to aggregate all answers which user choose other and type his/her respond on the box in survey123. I just want to show how many other respond but I don't want to see actual answers. you can see below a screen shot which i couldn't find the way and I just want to have one bar for all other together. I have this arcade code which group each respond but I don't know how can I add other to. // Reference layer using the FeatureSetByPortalItem() method.
var fs = FeatureSetByPortalItem(Portal('https://www.arcgis.com'),
'itemID' , 0,
['neighborhood'], false);
// Empty dictionary to capture each hazard reported as separate rows.
var choicesDict = {'fields': [{ 'name': 'split_choices', 'type': 'esriFieldTypeString'}],
'geometryType': '', 'features': []};
var index = 0;
// Split comma separated hazard types and store in dictionary.
for (var feature in fs) {
var split_array = Split(feature["neighborhood"], ',')
var count_arr = Count(split_array)
for(var i = 0; i < count_arr; i++ ){
choicesDict.features[index++] = {
'attributes': { 'split_choices': Trim(split_array[i]),
}
}}}
// Convert dictionary to featureSet.
var fs_dict = FeatureSet(Text(choicesDict));
// Return featureset after grouping by hazard types.
return GroupBy(fs_dict, ['split_choices'],
[{ name: 'split_count', expression: 'split_choices', statistic: 'COUNT' }]);
... View more
11-04-2021
12:46 PM
|
0
|
2
|
554
|
POST
|
Thanks @ABishop I know this way. However, the data come from survey123 and I don't want to touch the survey and publish it again. i am thinking maybe I can add arcade to webmap something like popup or using arcade and add fields
... View more
10-21-2021
06:32 AM
|
0
|
3
|
967
|
POST
|
Hello all I am trying to find a way which lat and long or x y added automatically to excel file when I downloading data from ArcGIS Dashboard? Like when you downloading hosted layer using export. any idea or work around or Arcade code to add to webmap?
... View more
10-20-2021
10:41 AM
|
0
|
5
|
1044
|
POST
|
Hello, I am looking for arcade code for example when I choose Queens in question A in question B just show me community code of that borough. Do we have any sample of it here
... View more
10-07-2021
01:48 PM
|
0
|
1
|
604
|
POST
|
Hello @EmilyMcLeanACTGOV you right about this and I am aware of this but the problem is this; When I click on trashcan and confirm you need to do everything again in data, Indicator and general tabs. I couldn't find a way for this. Lets say you change your mind and don't want to work with Arcade or by mistake you click on Advanced formatting. By confirming you lose your other set up too.
... View more
09-28-2021
06:20 AM
|
0
|
1
|
1452
|
POST
|
Hello, When I enable Advanced formatting in Indicator at dashboard I can't go back to default view without losing my setting in data to general and I need to start everything from beginning. is this a bug or I am missing something? Best
... View more
09-27-2021
01:12 PM
|
0
|
4
|
1498
|
POST
|
Thank you. Yes I tested it and it is working fine. Great app . one question, Do you know when we can have edit function in map viewer like classic one? ( disable fields in popup and choose which fields be editable/disable)
... View more
09-23-2021
09:30 AM
|
2
|
4
|
1724
|
Title | Kudos | Posted |
---|---|---|
1 | 05-14-2024 01:35 PM | |
1 | 03-11-2022 11:40 AM | |
1 | 08-25-2023 10:36 AM | |
3 | 06-26-2023 09:02 AM | |
1 | 05-24-2023 08:46 AM |