Alec Pojidaev's InfoPath Blog
Stuff published for no reason (cool codeless infopath solutions mostly)

Multiple value control

Thanks to Ranjit Batra who chalenged me to create a control similar to what is exist in Lotus Notes.

This control emulates multiple choice control that is not available in InfoPath. Enjoy!

About these ads

5 Responses to “Multiple value control”

  1. I’m back again to pester you. I have been fooling around with this and I can’t figure out how to are parsing the string with the comma “,”. Looking at the double eval I changed every comma and I got nothing returned. I have a way to add a newline and would like to replace the comma with this. Would you provide these details, thank you.

  2. Thanks, that was the problem i was having. I did not know which one was the regular seperator. I eventually figured out that there were 2 places that had to be replaced, then with some other help i was able to figure it out. Without taking any of your thunder, all the glory goes to your original solution.
    thanks
    here is an updated xml file attached as a resource. the crlfb (before) has the semi-colon before the newline

    <?xml version="1.0" encoding="UTF-8"?>
    <characters 
        cr="
" 
        lf="
    " 
        crlf="
    " 
    	crlfb=";
    "
    	
    />
    

    here is your update formula (Edit Xpath). I needed to add where f1 is not blank to complete it.

    substring-after(xdMath:Eval(xdMath:Eval(my:f1[. != ""], 'concat(xdXDocument:GetDOM("characters")/characters/@crlfb, .)'), ".."), xdXDocument:GetDOM("characters")/characters/@crlfb)
    

    last step is to set the textfield to multiple lines

    thank you again


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 40 other followers

%d bloggers like this: