Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

XPath / Rules  in InfoPath 2010

Posted on 2011-03-14
5
Medium Priority
?
1,126 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 your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
New style of hardware planning for Microsoft Exchange server.
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

618 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