Quantcast

Maximum PC

It is currently Wed Oct 01, 2014 4:00 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: InfoPath 2003 programming
PostPosted: Thu Jul 24, 2008 12:19 pm 
Sharptooth
Sharptooth
User avatar

Joined: Mon Aug 01, 2005 1:17 pm
Posts: 397
Location: Fullerton, CA
Hello,

I have a question about creating either a VB script or a formula for an InfoPath form.

Here's the scenario: We have an InfoPath form at work for requesting days off. InfoPath has a nifty drop-down box called a DatePicker. The DatePicker box has a built-in calendar for easily selcting days. We have two on the form, one labeled DateBegin and the other DateEnd.

Company Policy dictates that employees need to separate the days requested onto two forms if the days fall in more than one pay period (1st - 15th & 16th - last of the month). For example: I want to take the 12th throught the 17th off.

I have been asked if we can configure the form to not allow dates that cross multiple pay periods. I believe it's possible, but I'm not much of a programmer (hardware kinda guy). Can anyone assist me with this?


Top
  Profile  
 
 Post subject:
PostPosted: Thu Jul 24, 2008 12:42 pm 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24224
Location: Granite Heaven
You'll get more responses if you provide some idea of the compensation offered for help. :)


Top
  Profile  
 
 Post subject:
PostPosted: Thu Jul 24, 2008 1:08 pm 
Sharptooth
Sharptooth
User avatar

Joined: Mon Aug 01, 2005 1:17 pm
Posts: 397
Location: Fullerton, CA
Unfortunately, I cannot offer any compensation other than my thanks and goodwill.

The payroll department is just getting tired of employees not paying attention to the clearly written instructions on the form about the pay periods.

We have two in-house software developers, but they do not have the time to work on this, as all their time (and time they don't have yet) is sucked into the giant black hole known as Pivotal (our browser-based CRM).


Top
  Profile  
 
 Post subject:
PostPosted: Thu Jul 24, 2008 4:02 pm 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8720
Location: Cleveland, Ohio
Without getting really into it, my guess would be it can be done by setting validation rulles in the Date Picker Properties. In the forms design view double click the calendar icon for the Date Begin and look at the properties. Click the Data Validation button. This gets you a Validation (Conditions With Data Validation). Click the Add button and create the rules. For example the Start Date ....

Work from there and put in your math functions or whatever. You work from there to set up your validation and messages if they try to do something against your rules.

Ron


Top
  Profile  
 
 Post subject:
PostPosted: Sat Jul 26, 2008 2:09 pm 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8720
Location: Cleveland, Ohio
The more I thought about it, this would serve as a starting point:

http://enterprise-solutions.swits.net/i ... script.htm

Using the link you should be able to manipulate the code to get what you are looking for.

Ron


Top
  Profile  
 
 Post subject:
PostPosted: Mon Jul 28, 2008 5:36 am 
Sharptooth
Sharptooth
User avatar

Joined: Mon Aug 01, 2005 1:17 pm
Posts: 397
Location: Fullerton, CA
Thanks, Reloadron.

I'll be playing around with it some more this week. I'll let you know how it turns out.


Top
  Profile  
 
 Post subject:
PostPosted: Mon Jul 28, 2008 2:06 pm 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8720
Location: Cleveland, Ohio
Yeah, let us know, I am curious on this one.

Ron


Top
  Profile  
 
 Post subject:
PostPosted: Mon Aug 11, 2008 11:07 am 
Sharptooth
Sharptooth
User avatar

Joined: Mon Aug 01, 2005 1:17 pm
Posts: 397
Location: Fullerton, CA
So one of our in-house developes saw my VBScript window open when walking by las week and that, accompanied with the undoubtedly harried look on my face, prompted him to offer help.

I had made what I saw as progress, but I really was over my head. Considering that I kept getting called away for the normal things I do at word (read: fix/replace BlackBerries, laptops, desktops, software applications, etc.) it was hard to concentrate enough on it anyway.

I'll get my hands on the finished code and post it here when it's finished, but it's a "low priority" item so it may take a while before that happens.

Now to focus on my troubled users like "Antivirus XP 2008" boy and "BlackBerry Stolen at the Beach" girl.....


Top
  Profile  
 
 Post subject:
PostPosted: Mon Aug 11, 2008 1:47 pm 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8720
Location: Cleveland, Ohio
Trying to work something like that and constantly called away makes for s difficult road. Hopefully with some interest from one of your developers things will progress.

When all is said and done I would like to see the code. Also worth keeping as it can later be modified for other applications.

Ron


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.