cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
halifaxious
Resolver II
Resolver II

Filtered table as datasource for Canvas App

Very much a Canvas noob here, so please be patient. Thanks.

I have a model driven app in a solution. I want to create a canvas app that uses 2 tables as a data source and saves the output to another table. Below are my tables and their relationships. I'd like to have one screen for each riskCategory in PRA_Questions. On that screen should be displayed each question in that category from PRA_questions with a dropdown populated by the answers from PRA_answers. When the user selects an answer, I'd like to create a new PRA_response and save it.

 

Using the onOpen event, I create 2 collections:

Collect(AllQuestions,PRA_Question);

Collect(QuestionsByRisk, GroupBy(AllQuestions, "new_riskcategory","questions")

My thought was to loop through the groups in the grouped collection. But neither collection appears to have all the fields filled out even though there is plenty of data in my model. Additionally, I can't figure out how to get only my custom columns as I don't need any of the automatically provisioned ones.

 

Please advise. I'm stuck on practically the first step. 😫

 

PRA_Questions

question: free text

riskCategory: Choice, text

maxWeight: roll up, max(PRA_Answers.weight)

 

PRA_Answers

question: Lookup to PRA_Questions table

answer: text

weight: whole number

 

PRA_Responses

score: whole number

answer: Lookup to PRA_Answers

quiz: Lookup to PRA_Quiz

 

PRA_Quiz

totalScore: calculated sum(PRA_Response.score)

quizTaker: Lookup to Users

1 ACCEPTED SOLUTION

Accepted Solutions

It turns out that I was doing things correctly but the data doesn't load when you collect it-- it loads when you want to use it. This was not very clear from the documentation (and did I ever read a lot of that!). The other thing I discovered is that sometimes just leaving and re-entering design mode fixes the problem of empty data. I'm not entirely sure why that is but it can be very frustrating.

View solution in original post

2 REPLIES 2
mcin9781
Community Support
Community Support

Would you be interested in a tutorial on how to create Canvas Apps?  This should help you in your beginning phases on how to attach data sources, create screens, etc.

It turns out that I was doing things correctly but the data doesn't load when you collect it-- it loads when you want to use it. This was not very clear from the documentation (and did I ever read a lot of that!). The other thing I discovered is that sometimes just leaving and re-entering design mode fixes the problem of empty data. I'm not entirely sure why that is but it can be very frustrating.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,441)