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.

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (2,195)