Hi all,
I have created an app in which i will be receiving user inputs for multiple fields ,which inturn will go to my linked sharepoint list,now what i am trying to acheive here is that when an user submits the data in powerapps,the powerapp before sumbitting it to the sharepoint list ,should check wheather the same record already exists in the sharepoint list and if it exists,it should give a warning to user and then user should be given 2 options : either to cancel submission or to delete the previous submission and move forward with new submission is it possible ?
For example,Consider person A has already applied for Sick leave for 10.12.18,now the same person A/person B applies for same Sick leave for 10.12.18,my app shouldn't take data instead give a popup/warning to user asking them to delete the old data and submit new one or cancel this submission..?
Please help me with some workaround atleast
EDIT : I was trying to use the following formula on the Onchange prop of one of text input box ,but it throws me an invalid argument error can u please help :
If(textinput.Text exactin 'SP list'.columnname && 'SP list'.anothercolumnname = "Sick Leave",Notify( "alrdy exist", NotificationType.Error ))
NOTE : This is what i am trying to acheive :
If(DataCardValue.Text exactin 'SP list'.columnname1 && DataCardValue2.Selected.Value = ThisItem.columnname2.Value = "Sick Leave" ,Notify("abort"),Notify("proceed"))
I tried this also,but nothing happened as soon as i click on submit nothing happens,also i got a delegation warning for using lookup.
Actually my requirement here is when i receive data from user i need take data from one data card and compare it with values of one column in sharepoint list if there is a hit then i need to check the records for all the hit has happened and compare another drop down value (i.e New Link) with another column value of that particular record in splist to check wheather it matches wth powerapp data (i.e New Link)
Note : the value i.e. "New Link" i am comparing here with a dropdown column,so i am gettting an invalid argument error also
Hi @vish_p,
I think there is something wrong with the formula that you provided.
The formula " splist.column2 = selected.value = "New Link" " is not supported within PowerApps. Please take a try to modify your formula as below:
If( !IsBlank(LookUp('YouSPList', ColumnName1 = DataCardValue1.Text)) &&
!IsBlank(LookUp('YourSPList', ColumnName2.Value = "New Link" && DataCardValue2.Selected.Value = "New Link")), Notify("The same record has been existed within the SP list, you could consider cancel submission or delete previous submission and submit new one"), SubmitForm(EditForm1) /* <-- EditForm1 represents the Edit form in your app */ )
Best regards,
Kris
Thanks for the reply 🙂
Actually in the formula shared by you ,i wanted to check wheather the splist.column2 = selected.value = "New Link".So the formula should look something like :
If( !IsBlank(LookUp('YouSPList', ColumnName1 = DataCardValue1.Text)) && !IsBlank(LookUp('YourSPList', ColumnName2.Value = DataCardValue2.Selected.Value = "New Link")), Notify("The same record has been existed within the SP list, you could consider cancel submission or delete previous submission and submit new one"), SubmitForm(EditForm1) /* <-- EditForm1 represents the Edit form in your app */ )
Is it possible to do that ? Coz when i tried that it shows me some invalid argument error
Hi @vish_p,
How you submit your form data within your app? using SubmitForm function or Patch function?
Based on the formula that you provided, I think there is something wrong with it.
I have made a test on my side, please take a try with the following workaround:
Set the OnSelect property of the "Submit" button within your app to following:
If( !IsBlank(LookUp('YouSPList', ColumnName1 = DataCardValue1.Text)) && !IsBlank(LookUp('YourSPList', ColumnName2.Value = DataCardValue2.Selected.Value)),
Notify("The same record has been existed within the SP list, you could consider cancel submission or delete previous submission and submit new one"),
SubmitForm(EditForm1) /* <-- EditForm1 represents the Edit form in your app */
)
In addition, if you want to compare three columns (one Text input box, one Combo box, one DatePicker) with each row in your SP list, please check the following article:
If( !IsBlank(LookUp('YouSPList', ColumnName1 = DataCardValue1.Text)) &&
!IsBlank(LookUp('YourSPList', ColumnName2.Value = DataCardValue2.Selected.Value)) &&
!IsBlank(LookUp("YourSPList", Text(DateColumn,"[$-en-US]mm/dd/yyyy") = Text(DatePicker1.SelectedDate,"[$-en-US]mm/dd/yyyy"))), Notify("The same record has been existed within the SP list, you could consider cancel submission or delete previous submission and submit new one"), SubmitForm(EditForm1) /* <-- EditForm1 represents the Edit form in your app */ )
More details about the LookUp function in PowerApps, please check the following article:
Best regards,
Kris
Any help on this will be appreciated 🙂
someone please help
@vish_p wrote:Hi all,
I have created an app in which i will be receiving user inputs for multiple fields ,which inturn will go to my linked sharepoint list,now what i am trying to acheive here is that when an user submits the data in powerapps,the powerapp before sumbitting it to the sharepoint list ,should check wheather the same record already exists in the sharepoint list and if it exists,it should give a warning to user and then user should be given 2 options : either to cancel submission or to delete the previous submission and move forward with new submission is it possible ?
For example,Consider person A has already applied for Sick leave for 10.12.18,now the same person A/person B applies for same Sick leave for 10.12.18,my app shouldn't take data instead give a popup/warning to user asking them to delete the old data and submit new one or cancel this submission..?
Please help me with some workaround atleast
EDIT : I was trying to use the following formula on the Onchange prop of one of text input box ,but it throws me an invalid argument error can u please help :
If(textinput.Text exactin 'SP list'.columnname && 'SP list'.anothercolumnname = "Sick Leave",Notify( "alrdy exist", NotificationType.Error ))NOTE : This is what i am trying to acheive :
If(DataCardValue.Text exactin 'SP list'.columnname1 && DataCardValue2.Selected.Value = ThisItem.columnname2.Value = "Sick Leave" ,Notify("abort"),Notify("proceed"))
thanks 🙂 this actually partially helped me ,in my case i have to take input from two fields (one dropdown and one textinput) and compare it with every row of data in my SPList to know if that combo exists in any of the row and if that combo is there then warning should go to user.
like in the example qouted above type of leave and date of leave should be taken as a combo
Hi @vish_p,
On my previous project I am used the condition on the "textinput" something like:
OnChange:If(YourTexInputName.Text exactin SPListSourcename.fieldname,Navigate(DuplicateErrorScreen, ScreenTransition.None),true, false)
Hope this help for you starting point.
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,079
Most Valuable Professional