using the quick report template, the add details page automatically sorts the attribute domain values alphabetically, rather than maintaining the order in the feature service. Also, the default values set for fields with attribute domains do not persist in the app. Any idea how to prevent the list from getting sorted and manually setting a default ("None")?
This can be done but requires some code changes at your end. Here are some steps (Pseudo code). Hope you find it useful.
1) Edit QR source code and Open quickreportapp.qml. Look for
function initializeFeatureService(errorcode, errormessage, root, cacheName)
2) find
if(fields.editable===true && fields.name!=root.typeIdField) {
var f = fields;
app.fields.push(f);
fieldsMassaged.push(f);
}
3) In this code block,
read the var f, it should be something like:
{
name: "opsstatus",
type: "esriFieldTypeString",
alias: "Operational Status",
domain: {
type: "codedValue",
name: "OperationalStatus",
codedValues: [
{
name: "Open",
code: "Open"
},
{
name: "Closed",
code: "Closed"
},
{
name: "Unknown",
code: "Unknown"
}
]
},
editable: true,
nullable: true,
length: 50
}
3) Sort the codedvales in alphabetical order, put it back to this jsobject
Hi,
we have introduced a new property, sortDomainByAlphabetical in AppStudio 3.0 release, to give the ability to change the coded value domain in alphabetical order.
You can download the AppStudio 3.0 desktop from here, creating a new Quick Report template, and click on the Edit icon to open Qt Creator when Quick Report app is selected, navigate to the appinfo.json file, and change sortDomainByAlphabetical to true.
I hope this helps
Thanks,
Tina
Thanks. We customized the form per Nakul's suggestion, but this will be handy!
Wetherbee