Section Properties Rules for "OR" split into separate rules and won't work!

P

pathcm00

Hello,

I'm having a little issue with InfoPath 2003. I have a section that I
want to hide of either of two conditions are true. I go into "Section
Properties" then Display then Conditional Formatting and create a rule
for if a is true OR if b is true hide this control. I publish it to
SharePoint and it doesn't work. When I reopen the InfoPath form and go
to the Section Properties the rule is split into two separate rules!
This of course will not work. I have created other rules for controls
(not section properties) that work just fine.

Is this a bug with Section Properties?

THanks
 
S

Scott L. Heim [MSFT]

Hi,

I just completed these sample steps and it appears to work as expected -
can you let me know your results of following these steps?

- Create a new, blank InfoPath form
- Add a text box
- Add a Repeating Section
- Add a text box inside the Repeating Section
- Right-click on the Repeating Section, choose Properties and select the
Display tab
- Click Conditional Formatting and then click Add
- In the first drop-down list choose Select a field or group and select the
first text box (not in the Repeating section) - probably field1
- In the second drop-down list choose "is equal to"
- In the third drop-down list choose "Type text" and then enter: a
- Click the "And" button and then select "or"
- Repeat the above steps for each drop-down but enter: b in the third
drop-down
- Save and test...what are your results?

For me, if I enter an a or a b in the text box the Repeating Section is
hidden - any other letter and it is visible.

Thanks!

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

pathcm00

Hey Scott thanks for the post.

I think my "logic" is incorrect because the above works of course (your
way or with just a regular section as in my example).

I think what I need is really this:

If A is NOT true OR B IS true then UNHIDE the control.

The problem is the only thing available in the form is HIDE. If there
were a 'hide this control" by default and an unhide function I think
this would work. The way InfoPath is however, I don't really know if I
can get it to work (although maybe with scripting it can). I want to
hide the control unless the User Role is "Approver" OR the User Role is
"Manager". The incorrect logic I was using was:

If the User Role is not Approver OR the User Role is not Manager then
hide the control. That statement will never be true DUH.

That's why I need:

If the UserRole is Approver OR the USer Role is Manager UNHIDE the
control.
 
S

Scott L. Heim [MSFT]

Hi,

OK - what about this option:

- I created a form with 3 Roles: Approver, Manager and Normal Users
- I added Conditional Formatting to the Repeating Section as follows:

User's Current Role --> Is Equal To --> Normal Users

Then: Hide This Control

In this manner, if I add myself to either the Approver or Manager Role the
section is displayed. However, if I add myself to the Normal Users role,
the section is hidden.

Does this help?

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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