|
POST
|
just not sure where the Console.log returns the value while in QT Creator....See my post below about running in QT Creator and the two errors I am getting "undefined" But am positive there are values in those fields. var vardamageType = selectedFeature.attributes.attributeValue("TYPE"); var varWMA = selectedFeature.attributes.attributeValue("WMA"); var varFGSymbol = selectedFeature.attributes.attributeValue("FG_Symbol"); // set the combo box's default value
damageComboBox.currentIndex = featAttributes.indexOf(vardamageType);
damageWMA.text = varWMA;
damageFGSymbol.text = varFGSymbol;
The first works the next two do not...BUT there are values in the WMA and FG_Symbol Fields.
... View more
05-14-2019
01:49 PM
|
0
|
0
|
2676
|
|
POST
|
I ran the app in QT Creator with this: To run your app in Qt Creator, click Run on the Tools > External > AppStudio menu. (You can also press Alt+Shift+R on your keyboard.) I see this error: ArcGIS.AppFramework.Player: Object: QObject(0x0) Text: "file:///C:/Users/tjv36463/ArcGIS/AppStudio/Apps/25ab7e6bad9b43508700122d31c63f43/Samples/UpdateFeatures.qml:124: Error: Cannot assign [undefined] to QString" file:///C:/Users/tjv36463/ArcGIS/AppStudio/Apps/25ab7e6bad9b43508700122d31c63f43/Samples/UpdateFeatures.qml:124: Error: Cannot assign [undefined] to QString The funny thing is I am positive there are values in the data for the fields ... very puzzled...will try and reach out to ESRI for solution
... View more
05-14-2019
01:46 PM
|
0
|
8
|
2011
|
|
POST
|
I am very new to this AppStudio...I am using the QT Creator and not sure how to return the Console Logging....
... View more
05-14-2019
01:19 PM
|
0
|
2
|
2676
|
|
POST
|
Yea I am really confused right now.....I am sure that there is a value in every "WMA" field I changed the variable to the vardamagetype and it works....but any other attribute in the service does NOT work... var vardamageType = selectedFeature.attributes.attributeValue("TYPE"); // var varWMA = selectedFeature.attributes.attributeValue("FG_Symbol"); damageComboBox.currentIndex = featAttributes.indexOf(vardamageType); damageTextField.text = vardamageType ; The above gives me the same value ...one in the combobox and the other in the TextField
... View more
05-14-2019
01:06 PM
|
0
|
0
|
2676
|
|
POST
|
Yea if you see my last two posts I am trying to feed the TextField with the Value of the Variable... If I do this it works fine: damageTextField.text = "Test"; But i need the value from the variable . I cant seem to get this passed to the text: on the TextField var varWMA = selectedFeature.attributes.attributeValue("WMA"); I tried NOTE: My TextField ID changes as I have written this a few times.... damageTextField.text = varWMA;
damageTextField.text = [varWMA];
damageTextField.text = ([varWMA]);
I also tried to write it to an object and then change that value still no go...Do I need to convert or handle the "varWMA" variable differently?
... View more
05-14-2019
11:35 AM
|
0
|
14
|
2676
|
|
POST
|
I got the combo box working but trying to write the "WMA" to a text box as there are not any domains with this field.+ I am trying to use the currentValue instead of the curentIndex I see the textbox but it is not populating the value of the WMA from the attribute value. I am looking to update more than one field....so looking to populate the textboxes with the values of the selected feature so they can be updated? // signal handler for selecting features
onSelectFeaturesStatusChanged: {
if (selectFeaturesStatus === Enums.TaskStatusCompleted) {
if (!selectFeaturesResult.iterator.hasNext)
return;
selectedFeature = selectFeaturesResult.iterator.next();
var damageType = selectedFeature.attributes.attributeValue("TYPE");
var WMA = selectedFeature.attributes.attributeValue("WMA");
// show the callout
callout.x = mousePointX;
callout.y = mousePointY;
callout.visible = true;
// set the combo box's default value
damageComboBox.currentIndex = featAttributes.indexOf(damageType)
WMATextBox.currentValue = featAttributes.valueOf(WMA);
}
} ComboBox {
id: damageComboBox
width: updateWindow.width - (20 * scaleFactor)
model: featAttributes
}
TextField {
//id: WMATextBox
text: WMA
font.pixelSize: 18 * scaleFactor
width: 280 * scaleFactor
}
... View more
05-13-2019
06:27 AM
|
0
|
16
|
2676
|
|
POST
|
In the MmpkManager.qml file I added line 13 commented line 15 added/modified line 16 I uploaded and did a make on the project....I downloaded and installed from AGOL and when I went offline it still saved the download to the Phone itself and not the SD Card: SAMSUNG-SM-J727V\Phone\ArcGIS\AppStudio\Data\QuickReport Am I missing something? onReadyStateChanged: {
if (readyState === NetworkRequest.DONE ){
if(errorCode != 0){
loadStatus = 2;
} else {
var root = JSON.parse(responseText);
if(root.type == "Mobile Map Package"){
loadStatus = 1;
var component = networkRequestComponent;
var networkRequest = component.createObject(parent);
var url = rootUrl+itemId+"/data";
var fileslocation = "/mnt/sdcard/ArcGIS/AppStudio/Data/QuickReport/"
//var path = [fileFolder.path, "~"+itemName].join("/");
var path = [fileslocation, "~"+itemName].join("/");
networkRequest.downloadFile("~"+itemName, url, path, typeNetworkRequest.callback);
} else {
loadStatus = 2;
}
}
}
}
... View more
05-13-2019
05:48 AM
|
0
|
0
|
2518
|
|
POST
|
Do you have a JS Fiddle of this or something ... trying to follow and having a hard time.... I assume you click a button and then can navigate to the folder of the zip shapefile?
... View more
05-09-2019
09:41 AM
|
0
|
0
|
5897
|
|
POST
|
So if I am correct I think this is the line that I need to modify var path = [fileFolder.path, "~"+itemName].join("/");
... View more
05-09-2019
05:14 AM
|
0
|
0
|
2518
|
|
POST
|
Perfect thanks....will give that a whirl....appreciated.
... View more
05-09-2019
05:06 AM
|
0
|
0
|
2518
|
|
POST
|
I am using the Quick Report template....maybe there is a setting in the QuickReportApp.qml file?
... View more
05-08-2019
06:13 AM
|
0
|
5
|
2518
|
|
POST
|
Can I install the app on my phone but store the .mmpk files on the external storage card? If so how do I point to this new location?
... View more
05-08-2019
05:49 AM
|
0
|
22
|
4924
|
|
POST
|
I am referencing the Update feature template in AppStudio..... I am trying to add another Combobox AND Text field that will be populated with the appropriate values once the feature is selected. If I add the variable below "varhabitable" The popup never occurs to allow me to click into the update popup. If I comment this line varhabitable = selectedFeature.attributes.attributeValue("habitable");
I can run the app but the combobox is not populated with the value of that record.
How do I build the update box with multiple Fields for update including text fields? // signal handler for selecting features
onSelectFeaturesStatusChanged: {
if (selectFeaturesStatus === Enums.TaskStatusCompleted) {
if (!selectFeaturesResult.iterator.hasNext)
return;
selectedFeature = selectFeaturesResult.iterator.next();
vardamageType = selectedFeature.attributes.attributeValue("typdamage");
varhabitable = selectedFeature.attributes.attributeValue("habitable");
// show the callout
callout.x = mousePointX;
callout.y = mousePointY;
callout.visible = true;
// set the combo box's default value
damageComboBox.currentIndex = featAttributes.indexOf(vardamageType);
damageComboBox2.currentIndex = featAttributes.indexOf(varhabitable);
}
}
... View more
05-07-2019
01:26 PM
|
0
|
18
|
5102
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2018 11:09 AM | |
| 1 | 09-10-2018 06:26 AM | |
| 1 | 09-15-2022 11:02 AM | |
| 1 | 05-21-2021 07:35 AM | |
| 1 | 08-09-2022 12:39 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-19-2022
09:23 PM
|