PLEASE HELP xdExtension! - InfoPath Dev
in

InfoPath Dev

PLEASE HELP xdExtension!

Last post 11-24-2006 02:39 AM by Shiva. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-23-2006 08:38 AM

    • edove
    • Top 500 Contributor
    • Joined on 08-21-2006
    • Posts 50

    PLEASE HELP xdExtension!

    Hi,

    I am trying to hide an option section using code, as I have come to realise that removing an option section deletes the data aswell!

    I have added an additional item to the drop down menu that appears when you click on an option section.

    In the MS Script Editor, I have then put this function:

    function hideSection::OnClick()
    {
    return true;
    }

    And as a ConditionalFormat for the section, I have set it to hide if xdExtension:hideSection is true.

    Now if I change the function, to instead of returning true, popping up a window with text in it, it works fine. When I click on the optional section, press the menu item that I've added it pops open the window.

    But with the return true code it just doesn't work. Instead when I try to preview the form I get this error:

    "Function 'hideSection' did not return a value, or it returned a value that cannot be converted to an XSL data type."

    Can anyone tell me what I am doing wrong?!? Or if there is a better way to do this!
  • 11-24-2006 02:39 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: PLEASE HELP xdExtension!

    Hi Edove,

    Your hideSection method like:

    function hideSection()
    {
    return true;
    }

    Whenever you click optional section this code will be run and 'hideSection()' function returns the true value. You can call in that function where do you want run this function.

    For conditional formatting for the section, you need to set xdExtension:hideSection() is true.
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.