how to make function fire when a button is pushed.

P

Paul Mayer

I am using InfoPath 2003.
I have a fucntion which checks to see if a file exist is a specific
directory. I have the function triggered to fire as part of the
conditional formating in an optional section. I use the the command
not(xdExtension:DFE()) to trigger the function. This works fine the
first time the conditional formating is triggered and the optional
section is hidden and/or not hidden. The problem I have is that the
conditioanl formating does not trigger when I query an new record.
The result from the previous coniditonal formating are displayed.

How do I make a run which will fire the conditional formating again
when I push the query record button (either as a rule or in vb script
code)?

My field inside the optional section is a hyperlink which I
want to be displayed if the attachment exist. I have displayed the
result from the function using the message box and the function is
giving me the correct results.

Any suggestion on how to get the fuction to run every time the user
clicks the run query button?
 
P

Paul Mayer

Is there a property or method for Visible or Enaabled (True or False) for
the this optional section in InfoPath 2003
 
S

Shiva (GGK Tech)

Hello,

We don’t have options like visible and enabled for section or field in code.
For this we have to set that condition in InfoPath directly.
 
P

Paul Mayer

Shiva:

I can get the event to fire using the xdExtenstion:DFE()
this set the conidtional formating for the 1st retrieved record. The
problem is that if I query another record the conidtional formating only for
the 1st time the conditional formating event is fired. Each subsequent
record queried get the same conditional formating that the 1st queried record
had. Therefore, if the results of the conditional formating for the 1st
record is false section is disabled and the next query results in a true
condition being returned from the function the results of the conditional
formating result in the section being disabled. Anothers word the conditioal
formating only works when the form is initially opened. I want to be able
to control enabling and disabling the section based on the results from the
function true or false? Is this possible to do?
 

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