web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / If statement inside Pa...
Power Apps
Answered

If statement inside Patch Statement

(0) ShareShare
ReportReport
Posted on by 1,164

Good Morning,

 

I have a simple patch statement that has a Source Text Column in Sharepoint but I use a Dropdown in Powerapps.

Patch(
 Contacts,
 Defaults(Contacts),
 {
 FirstName: txtFirstName.Text,
 LastName: txtLastName.Text,
 State: drpState.Selected.Value,
 }
 )

The Dropdown items is ["State", "ACT", "NSW", "NT", "QLD", "SA", "TAS", "VIC", "WA"]

Its default is 1

 

I basically want to deal with the prospect of user not selecting from the dropdown. In otherwords it stays on the default of "State"

 

If this was to happen I dont want to write anything to the Sharepoint column (instead of writing the word State)

 

Wondering how and where I would put the if statement to achieve this and what would it look like.

 

Thanks in advance

 

Todd

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    Hi @Tango ,

    You can have the InputTextPlaceholder as "State" or "Select State" and nothing will be written if nothing is selected. The Items can be

     ["", "ACT", "NSW", "NT", "QLD", "SA", "TAS", "VIC", "WA"]

    BTW which one are you in ?

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard