Back to dates ...

U

UKDeluded

Okay, I've searched, I've read, I've learned, I've confused myself ...

All I need is to be able to have a date field put in by someone and then
auto populate another date field for one month before.

Scenario: Person (A) has a one year membership expires on :EXPDATE 01/12/06.
On 01/11/06 user (B) can look at a from to see who needs a reminder.

Please help!!!!

Thanks!
 
U

UKDeluded

Cool, explains a lot but how do I change the 'get today date' to get a date
from a field in Infopath (for example expirydate) and work from that to
populate 'reminderdate'?

Thanks!
 
U

UKDeluded

Thanks, I am modifying and trying although my feeble brain hurts!

Great help though, you're a sir and a gent or indeed a lady and a ... hmm
.... have to think about that one ...
 
S

S.Y.M. Wong-A-Ton

Essentially, you just have to retrieve the date field with something like

var node1 = XDocument.DOM.selectSingleNode("my:myFields/my:field1");
var expirydate = node1.text;

where field1 is the expiry date field, do the date calculation, and then set
the reminderdate field with something like

var node2 = XDocument.DOM.selectSingleNode("my:myFields/my:field2");
node2.text = calculatedreminderdate;

where field2 is the reminder date field.

No use thinking about the sir, gent, or lady, stuff. I'll keep it simple. Go
for the last one in the list. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top