Bug in Text Box Data Validation using script based rule

R

RobinW

Hi

I've double check this and it seems to be broken.

Used the http://www.infopathdev.com/nuggets/default.aspx nuggest change
to allow xdExtension scripted code in rules.

My rule (a simple function which is working fine and allready used to
enable and disable buttons).

But if i try and add it to a text box data validation to show * when
the data is invalid and my function is true
i.e in Data validation ...

text box is empty AND expression xdExtension:MyScriptFunction() == True

should cause the * to appear when this is evaluated except it doesnt

changing the validation to simply xdExtension:MyScriptFunction() ==
True

Still doesnt work untill something is typed in the text box then
deleted and the cursor focus moved to another fiell THEN the * finally
appears unlike if it was just 'text box is empty' then the * is there
from the start

Hope this makes sense.

Robin
 
R

RobinW

Nope its a bug - if i have two fields one with the 'text box is empty'
* condition and the other with 'text box is empty AND expression
xdExtension:MyScriptFunction() == True'

and both fields are empty and the condition evaluates correctly etc etc

One has a * one doesnt

thats a bug to me

Rob
 
M

MatsonPP

It probably doesn't understand your function. You as a human undestand
it, but you can't expect InfoPath to go through and evaluate your
function with test data to see whether it says this textbox must be
required. For all InfoPath knows "xdExtension:MyScriptFunction() ==
True" could mean that your function evaluates to true when the textbox
is blank.

So there you have it, not a bug :)

See ya,
Matt
 

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