
Dear All,
I've a SharePoint Master list as follows:
List Name: Subjects
Column Names:
ID - OOTB SharePoint List column
Title Subject as display Name) - Single Line of Text - Having values as English, Math, History
Teacher - Person field multiple values - Having values as Teacher1, Teacher2, Teacher3
Now having transaction list as follows:
List Name: SchoolDiary
Column Name:
ID - OOTB SharePoint List column
Subject - Lookup column for Title from Subject List
Now in PowerApps form, depending upon Teacher logged in, I am Subjects allocated from Subject list. I am using Dropdown control to populate Subjects with below formula in Items property of this dropdown.
If(
!IsEmpty(
Filter(
Subjects,
User().Email in Teachers.Email
)
),
Sort(
Filter(
Subjects,
User().Email in Teachers.Email
).'Subject',
'Subject
)
)
And above formula gives me list of Subjects properly but it only has Subject column. Now in next step I need to Patch this column to add and update the records where I need to pass Id & Text. But I am unable to get Id as it's not in the filtered result. Can you please help me how can I get this & assign to Patch?
Thanks,
Sanjay
Hi @SanjayAdsure201 ,
By using the .'Subject' selector, indeed only the Subject column is returned. If you leave that out, you'll receive all columns, including the Id column to be used in a Patch():
If(
!IsEmpty(
Filter(
Subjects,
User().Email in Teachers.Email
)
),
Sort(
Filter(
Subjects,
User().Email in Teachers.Email
),
'Subject
)
)