POST
|
We have a scheduled task machine with Pro installed to run python 3.x. Issue: if a user is not signed in (connected to portal), our python 3.x scripts to not run and we are not getting alerted via our error logging. Is there a way to be notified that the user has logged out? We have enabled offline mode which helps but sometimes the user still gets signed out (for instance when renew our license) . Is there a arcpy function that will alert us if Pro is not connected to a Portal?
... View more
Thursday
|
0
|
1
|
27
|
POST
|
I see where I can change the color, but where can I add text?
... View more
10-22-2020
02:23 PM
|
0
|
1
|
104
|
BLOG
|
Now I don't have to hard code my portal when I build 3.10 in AppStudio...
... View more
09-03-2020
06:57 AM
|
0
|
0
|
1527
|
POST
|
I have a arcade expression that loops through a set of records and produces a comma separated list of parentrowids. for ( var p in parentrowids ) { array + = p . parentrowid + ", " ; } } var prid_array = array ; } I have a where clause a few lines down that uses the IN operator to filter on another table. I get this error not matter how I try and produce the "array". When I write the value to a table using this string: var prid_array = "('" + array + "')" ; I get this: However the table is populated as ('{67D92A25-79C7-4225-9AD1-C140662DEFCF}', '{F269CECB-70D3-4288-8D11-102025D3D701}', '{99AB8E1B-2759-43CA-88DE-7A5A2FDECDC6}', '') Is there a way to output a string to be used in a IN operator? Xander Bakker
... View more
08-12-2020
12:08 PM
|
0
|
2
|
53
|
POST
|
When I hard code in an array... var array = [ "2" , "2" ] ... right into the expression, it works. However, when I add that same array into a field, then call that field instead within the function, it doesn't see it as an array. $feature.array = ["2", "2"] var array = $feature.array Is there a way to call a string from a field and have the expression read it as a array? Xander Bakker
... View more
08-10-2020
01:50 PM
|
0
|
2
|
86
|
POST
|
Speechless. I added the name of the field as mentioned above and it worked. I will compare yours and mine to get a better understanding. You rock! var pipe = first ( pipes ) ; // why only the first??? This is to make sure I only have one record. If that makes sense.
... View more
08-06-2020
12:24 PM
|
1
|
1
|
148
|
POST
|
I did get that to work, but I had hard coded in my array. Now I am trying to create my array on insert. Lines 8 - 11 grab the related records and put them in an array. This breaks on line 17 when I comment out the hard coded array (line 12, but works when using var array. It would appear as though my array is not getting created. Any Ideas? var pipe = "" ; var invoice = "" ; var i = "" ; var c = "" ; var u = [ ] ; var counter = 0 ; var contract_fc = FeatureSetByName ( $datastore , "SUDOECMS.DBO.doe_EAP_pipelineabandon_contracts" , [ "contract" ] , false ) ; var sql = ( "parentrowid = '" + $feature . uniquerowid + "'" ) var array = filter ( contract_fc , sql ) var cnt = count ( array ) //var array = ["AM-094", "AM-095"] if ( cnt > 0 ) { for ( var c in array ) { var pipe = FeatureSetByName ( $datastore , "SUDOECMS.DBO.doe_EAP_pipelineabandon" , [ "*" ] , false ) ; var invoice = filter ( pipe , "invoice = '" + array [ c ] + "'" ) ; var i = first ( invoice ) ; u [ counter ] = { 'globalID' : i . GlobalID , 'attributes' : { 'q_1' : $feature . status , 'q_1comments' : $feature . q_xcomments , 'q_1rank' : $feature . q_xrank } } counter + + } return { "result" : $feature . q_x , 'edit' : [ { 'className' : 'SUDOECMS.DBO.doe_EAP_pipelineabandon' , 'updates' : u } ] } } else { return $feature . q_x }
... View more
08-06-2020
08:41 AM
|
0
|
3
|
148
|
POST
|
I am having trouble with for loops. This example prints out the second item in the array. var array = [ "RC-22p" , "RC-22e" ] ; ; for ( var c in array ) { var invoice = array [ c ] } return invoice The result is RC-22e. I am trying to loop through an array, look up the corresponding globalid and update that related record. When I run my code the first item in the array is completed, but it stops after the first one, it doesn't loop... How can I get my for loop to loop when my return is updating another feature class? var array = [ "RC-22H" , "RC-22I" ] ; var pipe = "" ; var invoice = "" ; var i = "" ; var c = "" ; //loop for ( var c in array ) { //lookup globalid based on item in array var pipe = FeatureSetByName ( $datastore , "SUDOECMS.DBO.doe_EAP_pipelineabandon" ) ; var invoice = filter ( pipe , "invoice = '" + array [ c ] + "'" ) ; var i = first ( invoice ) ; //if feature value is q_1, update the other record if ( $feature . q_x = = 'q_1' ) { return { "result" : $feature . q_x , 'edit' : [ { 'className' : 'SUDOECMS.DBO.doe_EAP_pipelineabandon' , 'updates' : [ { 'globalID' : i . GlobalID , 'attributes' : { 'q_1' : $feature . status , 'q_1comments' : $feature . q_xcomments , 'q_1rank' : $feature . q_xrank } } ] } ] } } //stops here but I want to repeat, it only updates the other record based on RC-22H, it does not update RC-22I. Xander Bakker
... View more
08-05-2020
01:47 PM
|
0
|
6
|
279
|