how to put logic into InfoPath forms to make them dynamic

X

xz

Used infopath last about 4 yrs ago so bear with me. I was wondering
how easy (or difficult) it is to put logic into an infopath form to
drive how the form appears to users. E.g., if the user selects xyz
from a list box, then 3 other fields appear, or disappear. We may
have 100+ of these IF conditions. I've done a lot with ASP.NET and
code-behinds... but am not sure how this works with infopath.

Thanks for any input
 
K

K.Ramana Reddy(GGK Tech)

Hi,

You can Use Conditional Formatting and Show/Hide fields based on the
selection you make in the Prior field.

I hope this will help for you.
 
X

xz

Conditional formating may not be enough. Perhaps Infopath is not able
to do it.
I need the ability to do more advanced logic like this:

If x>y and c=null
{
make txtbox2 invisible
set txtbox1="ssss"
set txtbox1 to not be editable
submit the form
}
else
{
if x<y and c=null
make txtbox2 visible
set txtbox1 = "abcd"
set txtbox1 to not be editable
}
else
{
submit the form
}
 
K

K.Ramana Reddy(GGK Tech)

Hi,

We can do your scenario using hide/show and rules.
Visible and Unvisible can do using hide/show and setting the value for
fields can do using rules based on conditions.
 
K

K.Ramana Reddy(GGK Tech)

Hi,

I have one question:- what are the values x,y and c?
Is these fields are in the form?
 
X

xz

Yes those letters above (x & y etc) are fields. So basically a
branching out of visible / invisible fields, based on earlier input
into other fields. The form could have 100 questions. But based on
what the user selects, they may only see 20 questions.

The issue is that the if conditions can be very long, and my
experience with expressions & conditional formatting (e.g. in Excel)
is that this is very cumbersome to do. I really need the ability to
have nested If's :)
 

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