I encountered a challenge when following the guidelines of this article.
In the Step: Writing the related schools into a collection
Faculty Field -> OnChange:
ClearCollect( collSchools, { Schools: Filter( Schools, Faculty.Value = DataCardValue2.Selected.Value ) } )
Property Explanation
collSchools | This is our collection where all related schools for the selected faculty are written in to |
Schools | This is the name of the column where the data is written in to |
Filter | This is the function that filters values from a data set. The format of this function is as follows: Filter(source,logical_test) |
Schools | This is the data set that we use in our filter. In this case, it is the Schools list we added as data source |
Faculty.Value | This is the value we are looking for in our data set. In this case, it is the Faculty lookup field in our Schools list |
DataCardValue2.Selected.Value | This is the selected faculty from our PowerApp |
I follow this fomulas but the result is an empty collSchools Collection.
Here is my Form Setting
And the OnChange of Faculty Dropdown:
And the collSchools Collection: Empty School Column
Can anyone help me resolve this problem?
Ok so it means something is incorrect in your data
CountRows(Filter( Schools, Faculty.Value ="hardcoded value" ))
When you go to SP list Schools - does it have any data? I am assuming Yes
Does it have values in Faculty column - see the values there
then try and hardcode that value exactly in the hardcoded value in formula above and test
I have discovered a serious problem with Preview Mode. I think it is the cause of this problem.
My Preview Function is not working. It's mean when I press F5 you can see my form like this:
Edit Mode
Preview Mode
It may be that it cannot recognize the value of drpd_Faculty.Selected.Value. And return an empty Collection.
Follow Pstork1's advice, I create a button with OnSelect Property:
ClearCollect( collSchools, { Schools: Filter( Schools, Faculty.Value = "Faculty of Health" ) } )
And it's work.
But when I go back for
ClearCollect( collSchools, { Schools: Filter( Schools, Faculty.Value = drpd_Faculty.Selected.Value ) } )
It does not work anymore.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
197 | |
174 | |
62 | |
33 | |
32 |
User | Count |
---|---|
337 | |
270 | |
109 | |
76 | |
59 |