Display list through an association

1
I am making a native app. I want to retrieve all building entries, against a survey, in a list view. I have the following nanoflow made to create building objects and save them. I have another nanoflow that calls the page with the list view. When I display just the building entity in a listview, I see all the building objects created, however, when I do it over an association, I see no output. I think no entries are being made in my Building_Survey association. What am I doing wrong here?
asked
6 answers
0

@Ronald Catersels

answered
0

Hey @Vijayabharathi, 

Thanks for getting back to me on this. I am calling the first microflow(from my original post) on the “Save and next” button in the below screenshot. In the microflow, I first commit “myQuestions” object and then retrieve the list of buildings using association over “Building_Survey” and then I pass the Survey Object in to my page to display list of buildings (as shown in my original post). I have checked my SQL db and there are entries getting saved in the “building_survey” table, which mean my microflow for creating building objects is working fine. I just can’t seem to retrieve the right entries (using association) to display.. 

 

 

answered
0

Hi Faiqa Ejaz,

                  Yesterday I could not give a reply to your question. I tried to replicate your app functionality in my sample app. So I created two entities one is Survey and other one is building which has the many to one relationship. Created one Survey object then Created multiple building objects and mapped with that Survey object.  So, I created one more page for list out the buildings based on the Context entity Survey. So I applied the Xpath constraint to the list like [ADE.Building_Survey/ADE.Survey/id = '[%CurrentObject%]']. Which will return the list of Buildings in a list view. 

For your reference, i am sharing the screenshot of my sample app.

I hope, this will helps you. If its solves your problem, you can mark it as Accepted answer.

 

 

Thanks and Regards,

Vijayabharathi V

 

 

 

 

 

 

 

answered
0

Hello Vijayabharathi

I followed as you said in your example, however I am getting this error with my XPath expression, as you can see in the screenshot below.. XPath: [NativeMobile.Building_Survey/NativeMobile.Survey/id = '[%CurrentObject%]'].

Also, I am making a native mobile app. Do you think that has anything to do with this error, since you used a web app as an example here. 

 

 

answered
0

Hi Faiqa Ejaz,

                   Why don’t use Data source as nanoflows instead. You can fetch the associated Building List right. So I tried with sample native mobile app. It works for me. Let’s try this one.

 

 

 

 

Results :

 

 

 

 

 

answered
0

Vijayabharathi. Check this.

 

answered