I have a powerapp that creates new items in an SPO list. I need to make sure there are no existing items in the SPO list that already have the same values that the user sets in the PowerApp when creating a new item.
For example I need to make sure there are no items in the SPO list that already have the same Brand, Model, and ColorValue, that the user is inputting into the PowerApp.
In the 2nd screenshot below, you can see I'm using the Lookup method on OnSelect property of the submit button of the EditItem form. It works fine for the Brand and Model datacardvalues because they're both text boxes in the PowerApp and text fields in SPO list
The problem I'm running into is the ColorLookUp Combo box value in the PowerApp
As you can see below, PowerApps wont let me compare "ColorValue" in the SPO List to the value selected in the combo box (DataCardValue11.Selected) .. In addition, it won't let me use the selected value in Combo box in my notification statement.
Anyone know how to address these issues?
Code in txt below..
!IsBlank(LookUp(Carlist, Brand = DataCardValue8.Text && Model = DataCardValue10.Text && ColorValue = DataCardValue11.Selected)),
Notify("An entry containing" & DataCardValue8.Text & " and " & DataCardValue10.Text & " and " &DataCardValue11.Selected & " already exists in the list." & " Please create a unique entry that does not already exist in the list" , NotificationType.Error),
Solved! Go to Solution.
Combo boxes use SelectedItems instead of Selected as they allow multiple selection. If the column in your data source is not a multi-select column, you could use a dropdown instead.
So you would use DataCardValue11.SelectedItems
You can try to use this for combobox
The column name will be the column which value you want to compare in your syntax (. . .ColorValue = DataCardValue11.Selected.ColumnName)
Hello @Jvasil ,
Glad to hear that can help.
Please mark my answer as solution so the other that maybe have the same problem as yours can find it more easily.
Check out the News & Announcements to learn more.
Did you know that you can visit the Power Query Forum in Power BI and now Power Apps
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.