I customized a form from a Sharepoint list.
I add two fields from a list to a form, both of which are dropdown. In the first field, the user must enter a SUBCATEGORY. The second field will be the CATEGORY. It turns out that I disabled the CATEGORY field and include a VLOOKUP function to return the name of the correct category. When saving the report through Sharepoint, only the SUBCATEGORY item is added to the list. The CATEGORY field is only added if the field is filled in by the user.
Question: How do I add the CATEGORY field to the list like this?
Solved! Go to Solution.
I decided based on the video by Reza Dorrani. I made some changes and it worked perfectly.
Cascading Dropdowns in Power Apps from SharePoint list or Excel - YouTube
Hi @PietroFarias ,
Could you please share more details about your scenario? Do you have another list which includes Category column and Subcategory column? Then would you like to make the category dropdown automatically populate with the corresponding category after subcategory is selected? What column types are the two columns, Choices or LookUp?
Assuming that category is a Choices type column and Subcategory is a LookUp type column in current SP list, and a Text type Subcategory column and a Choices Type Category column, since you use a LookUp to auto populate a corresponding category in the dropdown, you will need to modify the Update property of Category Data Card to:
LookUp(Choices(ListName.Category),Value = CategoryDropdown.Selected.Value)
Below is a test on my end:.
1\ List 1 includes Text column and Choices column, list2 includes LookUp column and Choices column:
2\ DefaultSelectItems of Combo box of Choices column is set to below formula and DisplayMode set to Disabled:
LookUp(list1,Title1 = DataCardValue2.Selected.Value).TestColumn
3\ Update of the data card which includes the disabled combo box is set to:
LookUp(Choices(List2.Test123),Value = DataCardValue1.Selected.Value)
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
I did the update, and it works when changing or adding an item. However, when I make the same change to the item, it does not work.
Your Answers:
[1] Then would you like to make the category dropdown automatically populate with the corresponding category after subcategory is selected?
YES
[2] What column types are the two columns, Choices or LookUp?
In Sharepoint, both are VlookUp
Based on what you answered, I did it as follows:
1. In the CATEGORY dropdown in 'DefaultSelectedItems' I put:
LookUp (SubcategoryList, Title = DataCardValue_Subcategory.Selected.Value).Category
In 'Category_DataCard' I changed the 'Update' property to:
LookUp (Choices (SubcategoryList.Category), Value = DataCardValue_Subcategory.Selected.Value)
I decided based on the video by Reza Dorrani. I made some changes and it worked perfectly.
Cascading Dropdowns in Power Apps from SharePoint list or Excel - YouTube
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
180 | |
52 | |
41 | |
38 | |
28 |
User | Count |
---|---|
255 | |
81 | |
71 | |
68 | |
66 |