Problem in "Rules --> Set a Fields's Value"

V

Vee Davan

Hi,
I have data field on InfoPath form called CompetitorID. When I query the
WebService, value for CompetitorID is having value NULL.
In this case drop down which binds to CompetitorID is getting disabled. If
CompetitorID is not NULL, then Competitor dropdown is getting Enabled.

So I want to know why Competitor drop down will be disabled if CompetitorID
is NULL.

Thanks,
Veeresh.
 
V

Vee Davan

No I am not using any Conditional Formatting to disable to the drop down.
There is no condition like if CompetitorID is blank/null, then disable the
dropdown. I am just wondering why dropdowns are getting disabled when its
binding fields are NULL. You can try this with your own sample.

Thanks,
Veeresh.
 
G

Greg Collins

Controls become disabled if a field/node is not present in the DOM. This is
appropriate behavior because there's no field to store a value into.

Likely what is happening is this NULL is translating into a missing field in
your DOM, causing the field to become disabled.
 
V

Vee Davan

Thanks much Greg. This may be the right thought, because when I tried to set
"0" to this NULL field, it was still NULL. I mean "Set a Fields's Value" is
not working for this NULL field, because it does not exist in the DOM!!!.
Can you please let me know how to verify the field presence in DOM.
Thanks,
Veeresh.
 
G

Greg Collins

The easiest way to tell if a field is present in the DOM is to save the form
out as an XML file, and then look at it using Notepad or Visual Studio or
some other editor. You can do a Search to quickly try to locate it rather
than trying to manually wade through a whole bunch of XML tags and content.
 
Top