cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JoseC12
Helper V
Helper V

Default Text input

Good evening everyone,

I have an Input Date Box next to "Fecha" and a Text Box next to "Semana".

If I select a date, I'd like that Text Box to be completed by a text I want. What formula should I insert?

Thanks

Jose

1 ACCEPTED SOLUTION

Accepted Solutions

Switch(
Text(Input_Fecha.SelectedDate);
"10/02/2020";"SEMANA 3 10/02-16/02";
"11/02/2020";"SEMANA 3 10/02-16/02";
"11/02/2020";"SEMANA 3 10/02-16/02";
"No Date Selected "
)

 

There was a bracket missing near "...Date". Thanks by the way, it works now.

View solution in original post

13 REPLIES 13
PowerAddict
Super User
Super User

Try setting the default property of the text box to:

If(!IsBlank(DateControl.Selected), "your text")

I am not in front of my computer, but this should work. Let me know if it doesn't.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

Hi @PowerAddict 

I refer that if I select a date, I want to save that text box with something I want. If I select another date, that text box shows another thing and successively.

Do you want to check for a specific date or do you want the text to change every time the date is changed? If so, is it different text each time the date is changed?

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

I want the text to change every time the date is changed and the text is different, so I think I need to put a lot of "If" formulas

Put this in the Default property of the textbox :
DatePicker.SelectedDate

On your textbox default put:
Switch( DatePicker1.SelectedDate, "01-05-2020", "Want You Want 1",
"10-05-2020","What You Want 2",
"01-01-2020", "What You want 3",
"No Date Selected " )

It doesn't work, I got error but I don't know what is the problem

Forgive me for the language barrier.
Can you copy and paste for correction in the formula. Much easier than picture.
Why use ; instead of the ,

@eka24

There are certain regions where ; is used instead of a ,

Thanks,
Hardit Bhatia
https://thepoweraddict.com

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.

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 (3,065)