I have made 2 quick report apps pertaining to 2 different surveys. Is there anyway I can join the 2 apps into one such that the user is given a choice of selecting which of the 2 surveys he wants to take inside a single app.
Once the user makes a selection then he should be directed to the WelcomePage.qml of one of the 2 apps.
qml
appstudio for desktop
#quick report
#welcomepage.qml
When the quickreport application loads the welcome page, one of thing it does is it initializes the feature service layer so that it has the necessary information to load the following pages in the stackview. If you want you can have another page before the welcome page. Where you can select one layer from multiple feature service layers. Based on the selection you can proceed with the normal quick report application.
So the short answer is yes you can achieve this but you need to do some customization's so that end user can select layer before proceeding further. And you can design it how ever you want to do that. Just to be clear this is not available out of the box.
-Nakul
Hi Nakul,
Thanks a lot for your help.
So I can just add an extra button to landingpage.qml of app1 that pushes the welcompage,qml of app 2 when clicked.
Also I think I will have to change the page names in app2 for avoiding conflicts.
Can you suggest to me which pages should I copy for the second app to work and which pages I can omit?
One more question I have is which all parameters from app2 will I have to hard code?(For example I will have to hard code the link to feature class in app2 when I copy it to app1)
The resources that you advised me to peruse in my previous question have been very helpful. Thanks a lot for that!
Best!
Ankit
Basically you need to override the featureServiceURL set in the appinfo.json properties page before it makes the call to this function
fetchFeatureServiceInfo(); This function gets called while the Landing page is being loaded. Hint:- Look at the QuickReportApp.qml to understand how the application initializes.
Hi Nakul Manocha ,
I tried to apply your advice and it is partially working. But I am stuck again and need your advice.
So what I did is that I created a new qml page (starting.qml) which opens before the landing page and has 2 icons. The user can choose either of the icons and based on his selection the FeatureLayerUrl is set and then the landingpage opens and things work perfectly.
MOVING ON TO THE ISSUE:
At the end of the stack (resultspage.qml) on pressing done the user is take back to the first page (starting.qml).
Now when I press the other button(which was not selected earlier) the add details page still shows the fields of the previous feature class.
I had made changes to the code that on pressing the button all the feature layer urls are changed and
serviceInfoTask.fetchFeatureServiceInfo() is called. HOWEVER If I restart the app and press then press the second button then the feature fields work well. I hope that you will be able to give me some guidance on this issue. _______________________________________CHECK CODE BELOW_____________________________________ onSignInClicked1: {
//serviceInfoTask.destroy()
//serviceInfoTask()
app.featureServiceInfoComplete = false
app.featureServiceInfoErrored = false
app.featureServiceURL = "url"
app.featureLayerId = "0"
app.featureLayerName = "layer1"
app.featureLayerURL = featureServiceURL + "/" + featureLayerId
theFeatureTypesModel.clear()
theFeatureAttributesModel.clear()
theFeatureAttributesVisualModel.clear()
serviceInfoTask.fetchFeatureServiceInfo()
app.isSmallScreen = (parent.width || parent.height) < 400*app.scaleFactor
stackView.push(landingPage);
}
onSignInClicked2: {
app.featureLayerName = "layer2"
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.