英文:
How to filter a gallery via a drop down selection fed by a lookup column in Power Apps
问题
I have translated the provided content for you:
我对PowerApps非常陌生。我完全是通过YouTube自学的,没有编程背景,所以需要将事情简化。
这是我的设置。我有一个主要的SharePoint列表,大部分数据都是从中提取的,标题为“Combined Inventory List”。在该列表上有一个名为“Mfg”的查找列,我已经通过该查找列的设置引入了“Mfg:Title”。
在我的PowerApp中,我有一系列下拉菜单来筛选我的“Combined Inventory List”中的画廊。
对于非查找列,以下方法有效:
下拉菜单:
Choices('Combined Inventory List'.'Mfg:Title')
画廊:
Filter(
'Combined Inventory List',
IsBlank(ItemTypeDropDownBox.Selected.Value) || IsEmpty(ItemTypeDropDownBox.Selected.Value) || ItemType.Value = ItemTypeDropDownBox.Selected.Value,
IsBlank(BrandDropDownBox.Selected.Value) || IsEmpty(BrandDropDownBox.Selected.Value) || Brand.Value = BrandDropDownBox.Selected.Value,
IsBlank('Style#DropDownBox'.Selected.Value) || IsEmpty('Style#DropDownBox'.Selected.Value) || 'Item#'.Value = 'Style#DropDownBox'.Selected.Value,
IsBlank(ColorDropDownBox.Selected.Value) || IsEmpty(ColorDropDownBox.Selected.Value) || Color.Value = ColorDropDownBox.Selected.Value,
IsBlank(SizeDropDownBox.Selected.Value) || IsEmpty(SizeDropDownBox.Selected.Value) || Size.Value = SizeDropDownBox.Selected.Value,
IsBlank(Garment_Build_Dropdown.Selected.Value) || IsEmpty(Garment_Build_Dropdown.Selected.Value) || GarmentBuild.Value = Garment_Build_Dropdown.Selected.Value,
IsBlank(Group_Dropdown.Selected.Value) || IsEmpty(Group_Dropdown.Selected.Value) || Group.Value = Group_Dropdown.Selected.Value,
IsBlank(Mfg_Dropdown_1.SelectedText.Value) || IsEmpty(Mfg_Dropdown_1.SelectedText.Value) || Group.Value = Mfg_Dropdown_1.SelectedText.Value
)
但我似乎无法使该筛选器与“Mfg”列一起工作。
我认为使用“Mfg.Title”列会有所帮助,因为它将是一个纯文本值,但似乎并非如此。
有人可以帮助我弄清楚如何使这个工作吗?
谢谢!!!
英文:
I am VERY new to powerapps. I'm completely self-taught through youtube and have no programming background, so things need to be dumbed down for me.
Here is my setup. I have a main sharepoint list that most of my data is pulling from titled "Combined Inventory List". I have a lookup column on that list called "Mfg" and I have pulled in "Mfg:Title" by the settings of that lookup column.
In my powerapp, I have a series of dropdowns to filter my gallery on that "Combined Inventory List".
The following has worked for the non-lookup columns:
Dropdown:
Choices('Combined Inventory List'.'Mfg:Title')
Gallery:
Filter(
'Combined Inventory List',
IsBlank(ItemTypeDropDownBox.Selected.Value) || IsEmpty(ItemTypeDropDownBox.Selected.Value) || ItemType.Value = ItemTypeDropDownBox.Selected.Value,
IsBlank(BrandDropDownBox.Selected.Value) || IsEmpty(BrandDropDownBox.Selected.Value) || Brand.Value = BrandDropDownBox.Selected.Value,
IsBlank('Style#DropDownBox'.Selected.Value) || IsEmpty('Style#DropDownBox'.Selected.Value) || 'Item#'.Value = 'Style#DropDownBox'.Selected.Value,
IsBlank(ColorDropDownBox.Selected.Value) || IsEmpty(ColorDropDownBox.Selected.Value) || Color.Value = ColorDropDownBox.Selected.Value,
IsBlank(SizeDropDownBox.Selected.Value) || IsEmpty(SizeDropDownBox.Selected.Value) || Size.Value = SizeDropDownBox.Selected.Value,
IsBlank(Garment_Build_Dropdown.Selected.Value) || IsEmpty(Garment_Build_Dropdown.Selected.Value) || GarmentBuild.Value = Garment_Build_Dropdown.Selected.Value,
IsBlank(Group_Dropdown.Selected.Value) || IsEmpty(Group_Dropdown.Selected.Value) || Group.Value = Group_Dropdown.Selected.Value,
IsBlank(Mfg_Dropdown_1.SelectedText.Value) || IsEmpty(Mfg_Dropdown_1.SelectedText.Value) || Group.Value = Mfg_Dropdown_1.SelectedText.Value
)
I can't seem to the filter to work with the mfg column.
I thought that using the "Mfg.Title" column would help because it would be a text only value but that doesn't seem to be the case.
Can someone help me figure out how to make this work?
Thank you!!!
答案1
得分: 0
尝试使用以下公式:
Filter(
'Combined Inventory List',
IsBlank(ItemTypeDropDownBox.Selected.Value) || IsEmpty(ItemTypeDropDownBox.Selected.Value) || ItemType.Value = ItemTypeDropDownBox.Selected.Value,
IsBlank(BrandDropDownBox.Selected.Value) || IsEmpty(BrandDropDownBox.Selected.Value) || Brand.Value = BrandDropDownBox.Selected.Value,
IsBlank('Style#DropDownBox'.Selected.Value) || IsEmpty('Style#DropDownBox'.Selected.Value) || 'Item#'.Value = 'Style#DropDownBox'.Selected.Value,
IsBlank(ColorDropDownBox.Selected.Value) || IsEmpty(ColorDropDownBox.Selected.Value) || Color.Value = ColorDropDownBox.Selected.Value,
IsBlank(SizeDropDownBox.Selected.Value) || IsEmpty(SizeDropDownBox.Selected.Value) || Size.Value = SizeDropDownBox.Selected.Value,
IsBlank(Garment_Build_Dropdown.Selected.Value) || IsEmpty(Garment_Build_Dropdown.Selected.Value) || GarmentBuild.Value = Garment_Build_Dropdown.Selected.Value,
IsBlank(Group_Dropdown.Selected.Value) || IsEmpty(Group_Dropdown.Selected.Value) || Group.Value = Group_Dropdown.Selected.Value,
IsBlank(Mfg_Dropdown_1.Selected.Value) || IsEmpty(Mfg_Dropdown_1.Selected.Value) || '正确的列名'.Value = Mfg_Dropdown_1.Selected.Value
)
在上述公式的最后一行,使用正确的列名来替代'正确的列名'
。如果这一列在您的 SharePoint 列表中是单选列,应该可以正常工作。
英文:
Try using formula like this:
Filter(
'Combined Inventory List',
IsBlank(ItemTypeDropDownBox.Selected.Value) || IsEmpty(ItemTypeDropDownBox.Selected.Value) || ItemType.Value = ItemTypeDropDownBox.Selected.Value,
IsBlank(BrandDropDownBox.Selected.Value) || IsEmpty(BrandDropDownBox.Selected.Value) || Brand.Value = BrandDropDownBox.Selected.Value,
IsBlank('Style#DropDownBox'.Selected.Value) || IsEmpty('Style#DropDownBox'.Selected.Value) || 'Item#'.Value = 'Style#DropDownBox'.Selected.Value,
IsBlank(ColorDropDownBox.Selected.Value) || IsEmpty(ColorDropDownBox.Selected.Value) || Color.Value = ColorDropDownBox.Selected.Value,
IsBlank(SizeDropDownBox.Selected.Value) || IsEmpty(SizeDropDownBox.Selected.Value) || Size.Value = SizeDropDownBox.Selected.Value,
IsBlank(Garment_Build_Dropdown.Selected.Value) || IsEmpty(Garment_Build_Dropdown.Selected.Value) || GarmentBuild.Value = Garment_Build_Dropdown.Selected.Value,
IsBlank(Group_Dropdown.Selected.Value) || IsEmpty(Group_Dropdown.Selected.Value) || Group.Value = Group_Dropdown.Selected.Value,
IsBlank(Mfg_Dropdown_1.Selected.Value) || IsEmpty(Mfg_Dropdown_1.Selected.Value) || 'Mfg column name'.Value = Mfg_Dropdown_1.Selected.Value
)
Use correct name of column in place of 'Mfg column name'
in above formula (last line).
This should work if this column is single selection column in your SharePoint list.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论