cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Cesarjblues
Frequent Visitor

How to set a duplicate value

Hi Community,

 

Im a creating a app for vacations, I have an scroll menu with this dates: 

14 ENERO 2021 / 30 ENERO 2021 (FT)
02 FEBRERO 2021 / 18 FEBRERO 2021 (FT)
22 FEBRERO 2021 / 10 MARZO 2021 (FT)
13 MARZO 2021 / 31 MARZO 2021 (FT)
03 ABRIL 2021 / 20 ABRIL 2021 (FT)
23 ABRIL 2021 / 11 MAYO 2021 (FT)
14 MAYO 2021 / 01 JUNIO 2021 (FT)
04 JUNIO 2021 / 23 JUN 2021 (FT)
04 JUNIO 2021 / 23 JUN 2021 (JR)


What I have done to avoid duplicated values, its to set on my SP list, unique values for this columns, but I want it to show an error message that alets that this option its already choosen. 

 

Thanks for your help

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
indhaa
Impactful Individual
Impactful Individual

Hi,

 

Do you mean that you have a scroll menu with custom date. So I'm assuming user can select only one date and you want to check from SP List if the date selected is already selected by another user.

In the submit button, you can set the verification as below and you can also set a popup msg if duplicate is there.


Also better you put a filter to remove the duplicate data from the scroll menu too. 

 

in the submit button put the below code

If

(

!IsBlank(LookUp(SPList, SPListColumnDate=ScrollMenuDataCardValue34.SelectedDate)),
Set(ShowPopUp,true),
SubmitForm(form2)

)

 

 

View solution in original post

5 REPLIES 5
indhaa
Impactful Individual
Impactful Individual

Hi

 

You could customize the error message of the data card and set the text property to what you wantindhaa_0-1618424955622.png
Example

indhaa_1-1618425002946.png

 

In the visible property of the Error, you can add the condition

indhaa_2-1618425165819.png

 

 

 

Hi, 

 

My apologize, I want to know wich formula it would work before to submit form, I have my submit button with this formula "SubmitFomr(form2);;Navigate(correct)... I need to check before to upload the info to check for duplicates 

indhaa
Impactful Individual
Impactful Individual

Hi,

 

Do you mean that you have a scroll menu with custom date. So I'm assuming user can select only one date and you want to check from SP List if the date selected is already selected by another user.

In the submit button, you can set the verification as below and you can also set a popup msg if duplicate is there.


Also better you put a filter to remove the duplicate data from the scroll menu too. 

 

in the submit button put the below code

If

(

!IsBlank(LookUp(SPList, SPListColumnDate=ScrollMenuDataCardValue34.SelectedDate)),
Set(ShowPopUp,true),
SubmitForm(form2)

)

 

 

View solution in original post

Hi,

If(!IsBlank(LookUp('Solicitud de vacaciones', periodos=DataCardValue20.periodos)),Set(ShowPopUp,true),SubmitForm(form1);;Navigate(Correcto)

 

I tried with your formula but appears all this error messages in English "unexpected characters" and "invalid number of arguments on this formula".

 

Sorry for the inconveniences

 

 

indhaa
Impactful Individual
Impactful Individual

Hi 

 

i see the closed bracket missing from your If Statement

 

If(

!IsBlank(LookUp('Solicitud de vacaciones', periodos=DataCardValue20.periodos)),

Set(ShowPopUp,true),

SubmitForm(form1); Navigate(Correcto)

)

 

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,351)