trouble with dynamic hyperlink

J

Joel Allen

Hello,

I'm trying to create a dynamic hyperlink in infopath. I'm trying to extract
the year out of one of the fields and it is not working. e.g. I think it's
just a syntax problem. Can you please help?

\\Year(StartDate)\etc...... or \\Year(my:StartDate)\etc...... .

Thanks for your help,
Joel
 
S

S.Y.M. Wong-A-Ton

Sorry, Joel. Just realized you might be trying to use the Year function of
VBScript in an XPath expression. If this is the case, that will not work,
since dates in Infopath are not objects, but just text.

If you are using formulas, look into using the substring() function to
extract the year in a date. If you are using code, try the Mid() function of
VBScript.

Let me know how it goes.
 
J

Joel Allen

Thank you! Substring worked perfect.

Joel

S.Y.M. Wong-A-Ton said:
Sorry, Joel. Just realized you might be trying to use the Year function of
VBScript in an XPath expression. If this is the case, that will not work,
since dates in Infopath are not objects, but just text.

If you are using formulas, look into using the substring() function to
extract the year in a date. If you are using code, try the Mid() function
of
VBScript.

Let me know how it goes.
 

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