Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a question for you bright minded souls. I have an Infopath form for a Sharepoint List (meaning that this is considered an Infopath List Form) that I would like certain behavior for... and I'm not quite sure how to achieve it.

The gist is, I have two dropdowns on the form and I want the second dropdown to change its values based on the first dropdowns selection.

Both are pointing at the same list. The list looks like so:

ID, ModuleName, SystemName, PayCode, LineOfBusoness
1, Mod1, Sys1, O, LOB1 
2, Mod2, Sys2, O, LOB2
3, Mod3, Sys3, C, LOB3
4, Mod3, Sys4, O, LOB3

The first dropdown contains just the paycodes, so basically "O", and "C".

Now the second dropdown is where it gets tricky.

The second drop down is to display all the Lines of Business (LOB) from that list based on the PayCode selected in the previous dropdown. If they select "O" then just display all the LOBs that has the paycode of "O".

BUT... if they select "C"... well then there are also dropdowns on the form where they have already selected System and Module... so it would then take those values that were selected and choose the value in the list that has the System they chose, the Module they chose, and the Paycode they chose.

How can I do that? My first thought was well, just use code... but it turns out Infopath does not allow custom code on a "list form" which this is... wtf? So then the next option is to use the "cascading dropdown" approach whereby you can also use rules and filters to try and achieve this behavior.

Can that be done? What are your thoughts as to how you would tackle this problem?

Thanks in advance, and please let me know if you need additional information!

share|improve this question

1 Answer 1

My first thought was well, just use code... but it turns out Infopath does not allow custom code on a "list form" which this is... wtf?

Infopath forms based on templates of type/conpatibility Sharepoint List Form are not XML data forms but directly linked to underlying sharepoint lists so they do not permit code-behind

Though, I could not grasp why do you need code-behind for classic cascading dropdowns in Infopath

So then the next option is to use the "cascading dropdown" approach whereby you can also use rules and filters to try and achieve this behavior.

Can that be done?

Why not. There are a lot of tutorials on the internet how to do it codeless, with rules. Here is the one I found by googling

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.