I have a SharePoint list (List 1) that I've created a power app form for. I have a field called App ID that is a lookup field to a data source. What I'm attempting to do is say, if you select an App Id on my form, and there is already a row in my list with that App ID, give the user a message like, "This App ID already has a row created. Please update the existing row for your App ID.".
I'd like to no have them go through the whole form, and submit, before finding out its already in there.
Any ideas on this?
onchange of that field (assuming its text input or something?) throw out a lookup formula that returns a notify
Looking for more specific help. I understand the notify but not the lookup part. Can you help me write what I need to put in onchange? The field is called datacardvalue2
this will only trigger after they have clicked out of the area they are typing and selected something else in the app if placed in onchange
///List 1 is list name /// title is column name in list ///datacardvalue2.text is where they typed If(CountRows(Filter('List 1',Title=datacardvalue2.Text))>0,Notify( "This APP ID has already been added", NotificationType.Error ))
alternatively you can place it in a timer with an timer.
set the on timer end to
If(CountRows(Filter(InProgressTrainingClass,Title=TextInput5.Text))>0,Notify( "Duplicate Entry", NotificationType.Error );Set(repeatVar,false),Set(repeatVar,true))
auto pause and auto start on and repeat set to
and also place
in onselect and onchange of textbox in this version.
That will have it pop up even before they move out of the box
It also didn't like the .Text so I chose .SearchText but still got the above error. Thanks for the help, it gets confusing for a novice!
Delegation warnings are not errors, they are just warnings. CountRows does not work once a splist has more than 2000 items on it due to delegation. It will only ever show you that warning in the App Editor, not on device where app is running. If you would have more than 2000 items on your list then you would need to come up with a seperate delegable method.
Gotcha - that shouldn't be an issue.
However, this still isn't showing an error when I move out of the field, after choosing a duplicate value.
I mentioned I had to change .Text to .SelectedText to fix an error. But still, no luck.
did you create the timer control I suggested? The timer is a much more reliable way to get the error to show up. (If you wanna test your code to make sure it works throw it onto the onselect of a button, and then you can make sure there are no errors in what you have coded)
Your chance to join an engaging competition of Power Platform enthusiasts.
The Super User program for 2022 - Season 2 has kicked off!
Attend in person or online, there are incredible conferences and events happening all throughout the month of September.
In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.