cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tguihur
Helper I
Helper I

If inside a Patch function

Hi all,

 

I have 2 dropdown lists, what I want is that if someone select "z-Autre"  my app should save the output in the dropdown2 otherwise the app should save dropdown1. All of that in order to create a new record in SharePoint.

 

I have the following code:

Patch(Demandes; Defaults(Demandes);{Date_début:DatePicker1.SelectedDate;Date_fin:DatePicker2.SelectedDate; Commentaires:TextInput1.Text; Titre:Label_Employe.Text;If(Dropdown2.Selected="z-Autre";Typec:Dropdown1.Selected;Typec:Dropdown2.Selected)});;Navigate(EcranSortie;ScreenTransition.CoverRight)

 

The error showing is:  Waiting for an operator & or *

 

I dont sure what is the problem, either my IF inside a PATH or IM missing an operator..

 

Anyone have an idea?

 

Thank you so much,

 

10 REPLIES 10

Hi @WarrenBelz 

 

thank you for your answer.

 

I finally figured out like this:

 

Typec:If(Dropdown2.Selected.Colonne1="z-Autre"; Dropdown2.Selected.Colonne1;Dropdown2.Selected.Colonne1)}) ;;

 

Have a good day.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,434)