Hi,
I am new to powerapps.I have an App with problem. I don't want users to save duplicate data in sharepoint.
I have to a sharepoint list named as 'SPList' with multiple columns and I want to check duplicates for two columns before saving data in SP.
Example :
I have SP with the columns
System Name System Description
------------------ ------------------------
System ABC Desc A
System XYZ Desc X
System PQR Desc P
....etc have multiple entries
When I am adding new entry to Sharepoint it should check for below
System ABC - Desc X ===> it should accept the entry
System XYZ - Desc A ===> it should accept the entry
System ABC - Desc A ===>it should give error as duplicate entry
System XYZ - Desc X ===>it should give error as duplicate entry
Please suggest. Thanks in advance.
Hi,
Can you try enforcing unique value in SharePoint Field.
It will take unique value only for that particular column.
I want to make System Description unique based on System Name column.
the output like below
Example :
I have SP with the columns
System Name System Description
------------------ ------------------------
System ABC Desc A
System XYZ Desc X
System PQR Desc P
....etc have multiple entries
When I am adding new entry to Sharepoint it should check for below
System ABC - Desc X ===> it should accept the entry
System XYZ - Desc A ===> it should accept the entry
System ABC - Desc A ===>it should give error as duplicate entry
System XYZ - Desc X ===>it should give error as duplicate entry
Try this:
If(
IsBlank(LookUp(Datasource,SystemName= TextInput1.Text)) &&
IsBlank(LookUp(Datasource,SystemDescription = TextInput2.Text)),
SubmitForm(Form1),
Notify("Already Exist"))
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hi @eka24 ,
I have tried this, As I have System Name as dropdown getting the error as "Invalid argument type".
If(
IsBlank(LookUp(SPList,'System Name'= DataCardValue1.Selected.Value)) &&
IsBlank(LookUp(SPList,'System Description' = DataCardValue2.Text)),
SubmitForm(Form1),
Notify("Already Exist"))
getting error for this line 'System Name'= DataCardValue1.Selected.Value for = to 'Invalid argument type'.
Show the formula on the items property of the dropdown
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Change the formula to:
If(
IsBlank(LookUp(SPList,'System Name'= DataCardValue1.Selected.SystemName)) &&
IsBlank(LookUp(SPList,'System Description' = DataCardValue2.Text)),
SubmitForm(Form1),
Notify("Already Exist"))
Hi @eka24 ,
I have changed formula to the below
If(
IsBlank(LookUp(SPList,'System Name'= DataCardValue1.Selected.SystemName)) &&
IsBlank(LookUp(SPList,'System Description' = DataCardValue2.Text)),
SubmitForm(Form1),
Notify("Already Exist"))
I am getting error to 'System Name'= DataCardValue1.Selected.SystemName this line for SystemName is--
"Name isn't valid.This identifier isn't recognized."
And even I have tried the below code but no luck 😞
If(
IsBlank(LookUp(SPList,'System Name'.Value= DataCardValue1.Selected.SystemName)) &&
IsBlank(LookUp(SPList,'System Description' = DataCardValue2.Text)),
SubmitForm(Form1),
Notify("Already Exist"))
Please suggest.
If the formula below still have issues, Take a screenshot of the formula on the Drop down and post.
Again is the name of your form Form1?
If(
IsBlank(LookUp(SPList,'System Name'= DataCardValue1.Selected.'System Name')) &&
IsBlank(LookUp(SPList,'System Description' = DataCardValue2.Text)),
SubmitForm(Form1),
Notify("Already Exist"))
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
User | Count |
---|---|
255 | |
106 | |
85 | |
51 | |
43 |