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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Send a default value b...
Power Apps
Unanswered

Send a default value based on a condition to SharePoint

(0) ShareShare
ReportReport
Posted on by 340

Hello, I was hoping someone could help please

I have toggle that controls whether a datepicker is visible or not, in a form.

If the date picker is visible and people choose a date , that date goes to SharePoint.

What I want , is that if they dont want to pick a date, so the toggle stays off, then send the number 21 to SharePoint.

 

Any ideas how I could do that please?

 

Thank you for any help

 

 

Categories:
I have the same question (0)
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    write your patch code in if block:

    If(Toggle1.Value, Patch Code to patch Date, Patch Code to Patch number 21);

     

    I am guessing there are two separate columns for date and your number 21. Because if the data type of the column is date time in sharepoint. It won't patch up number 21. In that case you'll need to add a text column. So both your date and number 21 will be patched in it based on condition

  • pricey79 Profile Picture
    340 on at

    @zmansuri Thank you for your reply

    Sorry , I dont understand your code, what differentiates what column it goes to in a form?

    And yes, there are two columns. Sorry, I should have ,mentioned that earlier

  • pricey79 Profile Picture
    340 on at

    Can anyone help please?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard