Posts Tagged ‘button’

InfoPath, Expressions and 256 Characters

Dienstag, Februar 12th, 2008

For once I'm writing in English, because I am translating English developer slang to German very badly (even worse that I write in English :P) and I'm sure there are more English-speaking developers. Maybe I will write a German version later on.

InfoPath behaves pretty strange when I use expressions that are longer than 256 characters. This morning I worked with rules and conditions on click of a button on an InfoPath form. In my opinion the following is a bug, but it might be a feature too of course:

InfoPath Button Properties Window

If you replace "(long expression here)" with any kind of expression which is longer than 256 characters, everything will go well when you press OK. Now open the properties window again. The expression will be cut to 265 characters. You can paste it again and it will be well again.

The problem is, e.g. you change a condition for a rule that applies on click. Everything will look well, but Apply or OK will not work. As soon as you close the dialog, the changes will be wasted. As a workaround (in German: "Würgaround"), change the expression to "asdf" (or anything that is shorter than the magic 256 characters), make your changes, apply the changes, reopen the window and paste the expression again.