last day (15 days later) » 

19:14
4
A: Does anyone know how to make an Infopath field required on Mondays only?

Mike2500Create a new field named "weekday" as type integer (whole number). Create a rule on your date field to set the value of weekday to the following formula: (number(substring(., 9, 2)) + number(number(substring(., 1, 4)) - (floor((14 - number(substring(., 6, 2))) / 12))) + floor(number(number(subst...

Thank you Mike! Follow up questions: 1) When I add the "weekday" field, should that just be a single line of text or a date and time type? 2) Then, where do I create the rule on the value of weekday? I have to associate that rule with the original date field?
I updated the post with the data type of weekday. The validation rule goes on each field you're trying to require on mondays. (so there are two rules in play, one is an action that sets the value of weekday. Weekday will have a number from 0-6, depending on the day of the week, courtesy of the extremely long formula. The validation function goes on any field that should be required on monday)
Thanks Mike. I took the following steps but it does not seem to be working. I'm sure this is user error. Can you advise what I might be missing? 1. Created new "number" field entitled Weekday 2. Created action rule on the Date field and created action rule asking that Weekday Field value be set against formula you provided (see image 11111 above) 3. Created validation rule on 2 other questions that I want to populate ONLY on Mondays and said run only when weekday is equal to 1 (see image 22222 above) When I attempt to fill out the form, look at image 33333 above... not working?
For the formula, when you click on add--> set a field's value --> value, don't paste it there, but first click on the "fx" button to bring up the formula editor. Then paste the formula.
Thanks Mike. Another question... now when I select Monday, the weekday field says "False" and when I select Tuesday - Sunday, the weekday field says "True"... any thoughts?
19:14
Either check to make sure that the weekday field is set up as a number, or adjust the condition to be based on the true/false instead of the weekday number.
K last question (I think!) When I create the new rule, I'm having trouble figuring out how I can say, make these 2 fields mandatory when Weekday = False... what are the steps to do that?
That's the purpose of the validation rule. click on one the two fields, add a validation rule, and set it up with the condition. Repeat for the other field. Of course, after adding a condition and an error message, test it out, as the rules are a little confusing.
Hey Mike. Does the validation rule mean that the field will not appear when the rule's condition is not met?
it's not that it won't appear, it will show up with a red box around it.
And the user won't be able to submit the form while the entry is invalid
Should I make the field "mandatory" under list settings in sharepoint?
19:20
No, because then it would be mandatory all the time.
the rule will make it mandatory if the condition is met.
ahhh
ok let me try
How do you know all this stuff
Darn, not seeming to work
So, for the condition, it's normally things like "field1 is blank". If field1 was blank, it would throw an error
So, set a condition of field1 is blank AND weekday = 1
ahhh
so the error is thown if both conditions aren't met
did that work for you?
It still lets me save the entry
19:28
save or submit?
Both
IP will always allow a save, regardless of any required fields.
Submit is only allowed if the rules are met.
Weekday contains "false" and Capacity_outlook is blank
So I entered all the *mandatory fields and weekday said false and capacity outlook was blank
And it all went through
if you swtich the date from a monday to a tue, you should see the red asterisk appear next to the textbox, correct?
No red asteriks showing up at all
19:31
So double check your rule
perhaps start with something simple.
put in a rule on the textbox of "datefield < 3/15/2017"
and run the preview of the form and experiment with that
as you pick different dates before or after the 15th, you should see the red asterisk appear.
ok so i got the Weekday to populate as 1,2,3,4,5 etc based upon day of week
am i picking the wrong rule type for the 2 fields I want to be mandatory on monday
should i be picking formatting rule or aciton rule
instead of validation rule
validation.
So I have validation rule.
Condition*
Weekday = "1" and Weekend_work is blank
I have that same thing running in a test form
if I don't pick a date, no asterisk
if i do pick a date that's not a monday, asterisk
where do you get the asterisk
19:39
if i pick a monday, and type something into the textbox, no asterisk
It's just how infopath validation works.
same behavior as if you marked a field as required.
Does it matter that I'm working off of entries made in SharePoint that are connected to this list?
Like, I set up all the columns and stuff in SharePoint
and then edit in InfoPath
are you still previewing in the infopath client?
does any of that interfere
or are you publishing each time ?
im doing a quick publish and then testing by filling out the form on sharepoint which shows up as an infopath-y type view
19:43
are you able to preview in infopath just to test the rule?
sure
let me try
so weekday shows as 1
and theres no red anywhere near the other fields
even though theyre blank
Does it matter that the 2 fields are drop down fields
not just requiring free form text
but actual selection from drop down
do they have default values?
Nope
choice fields in sharpeoint?
yes
like i have a list of 4 options
and they can choose 1 of 4 or leave blank as the field is not mandatory
or else theyd have to fill it out monday through fridya and it only applies on mondays
19:48
did you put in a screen tip?
no, should I?
yup.
LOOK AT THAT!!!!!!!!
It works!!! :)
Wow, thank you so much.
You're welcome!
That was great! I didn't think it would work
Wow, great.
Do you get paid to consult on this site?
19:50
No, just a slow day at work.
Well I certainly appreciate it.
20:02
Thank you !!!!!!!

last day (15 days later) »