Drop Down List assistance - Please help!! - InfoPath Dev
in

InfoPath Dev

Drop Down List assistance - Please help!!

Last post 04-30-2007 04:34 AM by B.Shiva Prasad. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 04-26-2007 06:13 AM

    Drop Down List assistance - Please help!!

    from the MS infopath forum site I was able to obtain the JS code (see code below) to allow Drop Down List selections to be inserted in a tex box.......it works perfectly.

    However, when multiple selections are choosen, they are inserted in the text box as follows (this is just an example):

    Priority Monitoring Report, Enhancement List Report, Write Up Memo, etc.

    It inserts the choosen values as a sentence.  What I want to know is, where in the code below (and what the code is) can I insert a code to tell it to do it like this:

    Priority Monitoring Report

    Enhancement List Report

    Write Up Memo.

    etc....

    Lastly, on the same subject of Drop Down Lists (not using the code below), when a value is choosen, it's inserted into the report underlined.  How can I turn that off?

    Any assistance you guys can provide me would be greatly appreciated!  P.S.  I'm using Infopath 2003

    Aye

     

    If you noted the Programming Language as JScript, then add the following
    code immediately before the last "closing brace" ("}"):

    if(eventObj.Operation == "Insert")
    {
    var objField2 = XDocument.DOM.selectSingleNode("//my:myFields/my:field2");

    if(objField2.text == "")
    {
    objField2.text = eventObj.Site.text;
    }
    else
    {
    objField2.text = objField2.text + ", " + eventObj.Site.text;
    }
    objField2 = null;
    }

  • 04-27-2007 04:32 AM In reply to

    Re: Drop Down List assistance - Please help!!

    Does anyone know the answer?  Any help would be greatly appreciated.  Thanks
  • 04-27-2007 05:07 AM In reply to

    Re: Drop Down List assistance - Please help!!

    Hi,

    Change the text box properties in "Display" tab .

    1. Doble click on the text box.

    2. Click on "Display" tab.

    3. Select  check box "page breaks" and select check box "Wrap" text and select "Expand to show  all text" value in scrolling drop down.

    I hope this will work for you. 

    K.Ramana Reddy / http://www.ggktech.com
    India.
  • 04-27-2007 05:54 AM In reply to

    Re: Drop Down List assistance - Please help!!

    hi

    Thanks for the reply, however, it's not working.

    it's still doing the same thing : (

  • 04-30-2007 03:14 AM In reply to

    Re: Drop Down List assistance - Please help!!

    Does anyone have a solution to this problem?
  • 04-30-2007 03:38 AM In reply to

    Re: Drop Down List assistance - Please help!!

    Hi Aye Caramba,

    Instead of "," put "\r\n"

    like this

    Instead of  "objField2.text = objField2.text + ", " + eventObj.Site.text;"  write  "objField2.text = objField2.text + "\r\n " + eventObj.Site.text"

    hope this will help you.

    B.Shiva Prasad
    InfoPath Dev,
    http://www.ggktech.com
    India
  • 04-30-2007 04:09 AM In reply to

    Re: Drop Down List assistance - Please help!!

    w00t!!

    IT WORKED!

    THANK YOU - THANK YOU - THANK YOU SO MUCH.  IT'S GREATLY APPRECIATED.

  • 04-30-2007 04:34 AM In reply to

    Re: Drop Down List assistance - Please help!!

    Hey

    You are Welcome Caramba.

    B.Shiva Prasad
    InfoPath Dev,
    http://www.ggktech.com
    India
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.