?
Solved

XPath / Rules  in InfoPath 2010

Posted on 2011-03-14
5
Medium Priority
?
1,120 Views
Last Modified: 2012-05-11
Hello Guys,

i got a little problem with InfoPath 2011, i want to check the day of the week with the function xdDate:Today().

Unfortunatly rules i append, to check if the day either starts with monday or tuesday ALWAYS fail. I really don't have a clou why this happens, cause it seems pretty clear on first sight, but it wont work for me?

Any Ideas on this behavior?
0
Comment
Question by:pa_gmbh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 9

Expert Comment

by:McOz
ID: 35130406
The reason checking for "Monday" or "Tuesday" always fails is because Today() does not return the name of the day, it returns a date in the format "2011-03-14".

There is no easy way to get the day name, but you can do it with code. See this link for an example of how this is done:

http://groups.google.com/group/microsoft.public.infopath/browse_thread/thread/94cab487feadc280/bf23d09bd5fbe274?lnk=raot&pli=1

Good luck!
0
 
LVL 9

Expert Comment

by:McOz
ID: 35150912
pa_gmbh, I did a little more looking around for a date-to-day formula in infopath. Here's a way to get it *without* code:

http://blueinfopath.wordpress.com/2009/11/22/weekday-name-function-in-infopath/

Hope it helps!
0
 

Author Comment

by:pa_gmbh
ID: 35199057
I did it with the attached file.

Works very well!
0
 

Accepted Solution

by:
pa_gmbh earned 0 total points
ID: 35199074
0
 

Author Closing Comment

by:pa_gmbh
ID: 35230047
this is a testtemplate to test the form.

It`s works perfectly!
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
New style of hardware planning for Microsoft Exchange server.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question