POST
|
This thread looks to be about the same issue: Survey123 Report dates off by one It looks like it may be related to Daylight Saving Time. That could explain why the date after the time change is correct, but the date before is incorrect.
... View more
11-20-2018
12:52 PM
|
1
|
0
|
403
|
POST
|
*Nota: usando Google Tradutor* Usando ModelBuilder, você pode fazer isso adicionando a ferramenta que deseja usar ao modelo, clicando com o botão direito do mouse na ferramenta e selecionando Make Variable (Tornar variável) -> From Parameter (Do parâmetro) para os parâmetros da ferramenta. Você então clicaria com o botão direito nas variáveis e marque "Model Parameter" ("Parâmetro do modelo") para os parâmetros que você deseja que o usuário insira. Para as variáveis que você quer que sejam fixas, você pode definir o valor e deixar "Model Parameter" desmarcado para que o usuário não o veja na interface da ferramenta. Anexado é um modelo de exemplo e sua interface. ___________________________________________ Using ModelBuilder, you could do that by adding the tool you want to use to the model, then right-clicking on the tool and selecting Make Variable -> From Parameter for the tool parameters. You would then right click on the variables and check "Model Parameter" for the parameters you want the user to input. For variables you want to be fixed, you could set the value and leave "Model Parameter" unchecked so that the user does not see it in the tool interface. Attached is an example model and its interface. Creating model parameters—Help | ArcGIS Desktop
... View more
11-19-2018
05:27 PM
|
0
|
0
|
540
|
POST
|
Testing if two values are equal should use two equal signs. That may have been why the first conditional gave a syntax error.
... View more
11-07-2018
05:10 PM
|
1
|
5
|
4415
|
POST
|
The reason why it won't work with \ and ' is because \ is used to escape characters using regex, and ' is used to enclose the string. I got this to work by escaping the \, then creating a separate string and substituting it into the expression. I used a hidden field named "characters" and set the default to the string I want to use: ^[^<>";\\']+$ Then in the constraint field for the input: regex(.,${characters})
... View more
11-06-2018
11:48 AM
|
0
|
1
|
1686
|
POST
|
That's interesting. Maybe another tool in the model changed the parser to Python. I'm not sure if that's possible, but I tested the script on its own in Model Builder and it used the VBScript.
... View more
11-06-2018
09:55 AM
|
0
|
0
|
2678
|
POST
|
You might just want to use a String parameter instead of a Feature Class parameter. It works for me if for the "output feature class" field I do something like %Workspace%\%Name of Feature Class to Create%, where Workspace is a Workspace variable and Name of Feature Class to Create is a String variable.
... View more
11-05-2018
03:12 PM
|
1
|
0
|
537
|
POST
|
You could use ArcPy to do that, and run the script in ArcCatalog, ArcMap, or in an IDE like IDLE (which comes installed with ArcGIS). Some of the classes and functions you'd probably want to use : MapDocument—Help | ArcGIS Desktop ListDataFrames—Help | ArcGIS Desktop ListLayers—Help | ArcGIS Desktop RemoveLayer—Help | ArcGIS Desktop Here's an example: import arcpy arcpy.env.workspace=r"C:\DirectoryWhere\MapDocument\IsLocated" mxd = arcpy.mapping.MapDocument("This_MXD.mxd") df = arcpy.mapping.ListDataFrames(mxd)[0] layers = arcpy.mapping.ListLayers(mxd,data_frame=df) for lyr in layers: if(lyr.name == "remove_this_layer"): arcpy.mapping.RemoveLayer(df,lyr) mxd.save() del mxd print "Done..." Basically what the script does is reference the MXD, point to the desired data frame, remove the desired layer based on its name, save the MXD, then delete the reference to the MXD to clear the lock on the file.
... View more
11-02-2018
05:55 PM
|
1
|
0
|
1469
|
POST
|
Edit: This is for a new survey, rather than an existing survey. Not sure if there's a workaround for an existing survey. The round() function automatically drops the 0. I don't think there's a way to change that, but if you convert the number to a string there are some ways you could format it the way you want, then display that string in the report. I haven't come across an easy way to do this with the functions available, but I came up with a way that has worked for me. My logic: Round the decimal number to 2 decimal places. Convert the decimal number to an integer. Calculate the length of the rounded decimal number and the integer. Calculate the difference between the length of the rounded decimal number and the integer. If there are 2 decimal places in the rounded decimal number, it should be 3 characters longer than the integer (decimal and the two numbers, e.g. 125.65 vs 126). If there is 1 decimal place in the rounded decimal number, it should be 2 characters longer than the integer (decimal and one number, e.g. 125.6 vs 126). If there are 0 decimal places in the rounded decimal number, it should be the same length as the integer. If the length difference is 2, that indicates that there is only one number after the decimal in the rounded decimal number. Assuming this means that a 0 was dropped, add the 0 back to the end of the string. If the length difference is not 2, don't add anything to the end of the string. Fields in my example XLSForm spreadsheet: type name label calculation bind::esri:fieldType decimal input Input calculate total Total ${input}*5 calculate tot_rounded Rounded total round(${total},2) calculate tot_as_int Total as integer int(${total}) null calculate len_tot_rounded Length of rounded total string-length(${tot_rounded}) null calculate len_tot_as_int Length of total as integer string-length(${tot_as_int}) null calculate len_diff Length difference ${len_tot_rounded} - ${len_tot_as_int} null calculate tot_as_text Total as text if(${len_diff}=2, concat('$',${tot_rounded},'0'), concat('$',${tot_rounded})) In this example, you could then display ${tot_as_text} in the report rather than the rounded total as calculated by the round() function. The attached image shows the table from this example survey after a few submissions.
... View more
11-02-2018
01:10 PM
|
0
|
1
|
1027
|
POST
|
You could restrict users to one decimal place using a regular expression in the constraint column. This regular expression, for example, allows the user to input between 1 and 10 numbers before the decimal, and 1 after: regex(., '^[0-9]{1,10}\.[0-9]{1}$') This page has some details and examples dealing with regular expressions: Formulas—Survey123 for ArcGIS | ArcGIS
... View more
11-02-2018
11:27 AM
|
3
|
5
|
6933
|
POST
|
Each Replace returns a string, and the expression can only return one value, so I think that's why only the last Replace was honored. You could create a variable to store the string from the first Replace, then do a second replace based on that string. Something like this: var str = Replace($feature.NAME + " Grades " + $feature.LO_GRD + "-" + $feature.HI_GRD,'0','K') Replace(str,'1K','10')
... View more
11-01-2018
06:24 PM
|
3
|
1
|
2157
|
POST
|
Credit budgeting might be of use here, at least to prevent users from consuming too many credits. Configure credits—ArcGIS Online Help | ArcGIS Five Strategies and Tools for Managing Credits in ArcGIS Online
... View more
11-01-2018
03:49 PM
|
1
|
1
|
2046
|
POST
|
This link might have the information you're looking for: Understand credits—ArcGIS Online Help | ArcGIS From that link: Capability Example of where used Credits used Demographic Maps and Layers Pan Living Atlas Tapestry layer in map 10 credits per 1,000 map requests (pan, zoom, and identify)
... View more
11-01-2018
11:26 AM
|
3
|
1
|
1683
|
POST
|
Disculpe, porque mi español no es tan perfecto, pero... Es posible que puedas usar la concatenación. Tal vez no sea lo ideal, pero no he encontrado otra forma y tuve éxito usándolo. Convertí el entero en subcadenas basadas en la longitud del entero, luego las concatené. Algo como esto podría funcionar: (Una nota: no funciona con números negativos) type name calculation bind::esri:fieldType bind::type integer num calculate numLen string-length(${num}) null int text numSeparado if(${numLen}=4, concat(substr(${num},0,1),".",substr(${num},1,4)), if(${numLen}=5, concat(substr(${num},0,2),".",substr(${num},2,5)), if(${numLen}=6, concat(substr(${num},0,3),".",substr(${num},3,6)), if(${numLen}=7, concat(substr(${num},0,1),".",substr(${num},1,4),".",substr(${num},4,7)), if(${numLen}=8, concat(substr(${num},0,2),".",substr(${num},2,5),".",substr(${num},5,8)), if(${numLen}=9, concat(substr(${num},0,3),".",substr(${num},3,6),".",substr(${num},6,9)),${num}))))))
... View more
10-30-2018
06:19 PM
|
1
|
1
|
973
|
POST
|
In case anyone comes across this or a similar issue: I found that the errors were caused by an unused Hazus ArcMap add-in. It seems that the add-in wasn't uninstalled when I uninstalled the rest of the software. I deleted the add-in and the errors went away.
... View more
10-30-2018
01:58 PM
|
1
|
2
|
876
|
POST
|
I think the reason why no labels are displaying is because that expression isn't valid in VBScript, which is the default label expression parser in ArcMap. It looks like a Python expression, but that format statement isn't quite right. Using the Python parser that expression is valid, but it would set all the labels to say "Field". What you'll probably want to do is use the VBScript FormatNumber function. Other considerations: That first statement in the for loop (lblClass.className = "Field") sets all the label class names to be "Field"—not sure if that's what you want. You might also want the layer.showLabels statement to be outside the for loop so that it isn't set on each iteration of the loop. If you're looking to label specific label classes in the layer, you could do something like this: if layer.supports("LABELCLASSES"): for lblClass in layer.labelClasses: if(lblClass.className == "LabelThisClass"): lblClass.expression = "FormatNumber([field],2)" lblClass.showClassLabels = True layer.showLabels = True Otherwise, if all the features in the layer are labeled the same way you could do something like this: if layer.supports("LABELCLASSES"): for lblClass in layer.labelClasses: lblClass.expression = "FormatNumber([field],2)" layer.showLabels = True This code uses VBScript for the label expression since that is the default parser. An equivalent Python expression could be written using the format() method: "format(float([field]),'.2f')". I don't think there's a way to change the label expression parser using ArcPy though, so you'll probably want to go with VBScript. A potentially useful reference: Building label expressions—Help | ArcGIS Desktop
... View more
10-30-2018
12:16 PM
|
1
|
2
|
2678
|
Title | Kudos | Posted |
---|---|---|
1 | 11-02-2018 05:55 PM | |
1 | 10-30-2018 01:58 PM | |
1 | 01-07-2019 11:49 AM | |
1 | 01-07-2019 12:27 PM | |
1 | 03-25-2019 01:33 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|