You are viewing limited content. For full access, please sign in.

Question

Question

Auto populate day of the week

asked on May 14, 2020

Hello,

 

I am wondering if it is possible to auto populate the day of the week within a form I am creating. We have it selecting current date, but the submitter also has to select which day of the week it is. It it possible to have it auto select based on the date?

here is a screenshot of the fields 

1 0

Replies

replied on May 14, 2020

Try a formula like

=TEXT(TODAY(),"dddd")

Today gets the current date and the format dddd is the text version of that day. 

2 0
replied on May 14, 2020

Oh, my formula shows the current day. You can replace TODAY() with your variable if you want the day that's selected. 

0 0
replied on May 14, 2020

Would I input that within CSS or Java scripting? 

0 0
replied on May 14, 2020

That is a field calculation, found on the Advanced tab of single line and number fields.

1 0
replied on May 14, 2020

Correct, I would use a read-only single line field and that formula. That way a user can only set the date but cannot change the day of the week to be incorrect. 

0 0
replied on May 14, 2020

I added a single line and put in that formula with the variable inserted in place of today and its not working. 

0 0
replied on May 14, 2020

Darn, I forgot that Text(Date) is one of the functions that doesn't work in Forms. 

https://answers.laserfiche.com/questions/125418/Forms-Date-Formatting-via-TEXT-Formula#125429

I will increase the priority of that request. 

0 0
replied on May 14, 2020

thank you! 

0 0
replied on May 15, 2020

Hi Darcee

You can use this formula to produce the results you want

=CHOOSE(WEEKDAY(DatefieldVariable), "Sunday", "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")

2 0
replied on September 6, 2024

In my own case, I want the Number of the week in the year shown based on the date selected.

The date field will show current date while the Week field will show current Week of the Year Please how  can i specify this?

 

Thank you

0 0
replied on May 15, 2020

FYI

The above is dependent on your Date field selection. If you wanted the formula to be standalone and just use the day the form is started, you could use

=CHOOSE(WEEKDAY(TODAY()), "Sunday", "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")

2 0
replied on September 6, 2024

Hello

Please where can i specify this formula? And is it a text field that one would use?

0 0
replied on February 4, 2021

OMG thanks Steve this was EXACTLY what I needed!  Javascript isn't really something I wanted to get into, and this was PERFECT.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.