This is the situation: I have a list with 2 lookup columns that gets data from another columns. This list is using InfoPath to create a cascade dropdown. The list present students status and it contains this columns nad its called StudentsStatus:
Title -> Single line of text
Class -> Lookup column that get the classes name from another list called Classes (Classes list contain an single line column only)
Student -> Lookup column that get the student's name from a list called Students. The Students list has two columns: Name and Class (this class column is a lookup that get its data from the Classes list)
Th idea is that by using cascading dropdown the user choose first the Class and the next dropdown shows only the student that assist to that class. It is working fine in InfoPath.
No I need to create an app with powerapps. When I am in the StudentStatus list I click on the PowerApps button to create a new app. At this point the app is showing select controls populated with all information from the respective lists. Then I delete the dropdowns controls and I create my owns. The first control show the Class names comming from the Classes list. The second control should filter the student's name depending of what class was selected in the Classes dropdown. For that I am using this formula in the student dropdown:
SortByColumns(Filter(StudentTest; Title = ddClass.Selected.Value); "Classname"; SortOrder.Ascending)
Where "StudentTest" is the list containing the list of student. The Title column in this list has to match to the selected value in the Class dropdown. if there is a match this dropdown (the student dropdown) should be populated with the content of the column Classname.
Whe I run the app to test this cascading behaviour It works fine. The problem is when the data sends to the list (when saving). Either the selected class or selected student get saved in the list. In powerapps I get an error message telling that the column in sharepoint was expecting a record value but its got a text value. I suspect that this is because the columns that should get the selected values are lookups and powerapps is sending text values.
How can I solve that missmatching of value formats?
I created a form in powerapps direct from the sharepoint list and I tested it without changing anything and everything works fine.
Now, if remember, the form contains 2 dropdown controls, one showing a list of class names and other showing students namne. This info comes from two columns in the sharepoint list that are lookup columns. The idea is that the user select the class name and the students dropdown gets filled with the name of the student that assist to just that class.
How can i filter the student dropdown based in the selection of the class dropdown?
I know that there is a video in youtube that show how to create cascade dropdown but that not works in my case because the columns that get the class and student names are lookup and in the video all columns are single line of text. I tested the solution of the video but the infopath connected to the list stop working since it needs those lookup columns.
Any idea how to filter the dropdowns in the powerapp?