Rules - multiple - InfoPath Dev
in

InfoPath Dev

Rules - multiple

Last post 06-15-2009 09:28 AM by warrtalon. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-05-2006 03:34 PM

    • nwillis
    • Not Ranked
    • Joined on 04-05-2006
    • USA
    • Posts 9

    Rules - multiple

    I have set up multiple submit buttons one view of my form with several rules associated with each button. However, after I'm almost finished I wondered if there was a way to copy the rules from one button to another. I can't figure it out, if you just try to copy the button, it wipes out the rules. Obviously the button do some different things, but some of the set up would be the same, just a little tweaking here and there....would save a lot of retyping and clicking.

    Does anyone know how to do this?
  • 04-05-2006 07:17 PM In reply to

    Unfortunately rules are not carried along with a button when you copy+paste inside of the Designer. This is one of the big advantages of using code behind buttons instead of rules.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 06-15-2009 03:12 AM In reply to

    Hi,

     I have a faced a similar problem when copying a button from one view in another one. Actually I had several views and a menu of buttons in the 1st view and I wanted to have the same menu in the other views, containing the same funtionality represented by rules. When I pasted the menu in the other view, some of the buttons didn't possesed the rules, but the strange is that some of them did. I tried to realize what dependence exist, but I couldn't find any!!! So I had to manually adjust the rules for each button. This was terrible and time consuming. Another thig that I faced is aging with copying buttons, but now with code behind. I had a table full of buttons with submitting functions, and all of the had conditional formatting. When I copyed the table into another view, it again copied only some of them with the corresponding names, the other were given automatically new names, which made the code unusable from the button. I had to open the button  and to put the correct name.

    I just wanted to mention my experience, and to say that I couldnt find more practical solution.

    Thank you for reading :)

    Best regards,

    Svetoslav  

  • 06-15-2009 07:00 AM In reply to

    One of the solutions might be creating hidden field with the set of rules shared by each button. Then,after executing actions which are different from shared set at one of the buttons just trigger Updated event on hidden field by assigning an new value (i.e. now()) so shared set of rules will be executed.

  • 06-15-2009 09:28 AM In reply to

    Matt Faus:
    Unfortunately rules are not carried along with a button when you copy+paste inside of the Designer. This is one of the big advantages of using code behind buttons instead of rules.

    I'm confused, though, because I make almost every form browser-enabled with the toolbar turned off.  In place of that, I create custom Submit and Close buttons.  I put them at the top and bottom of my views and usually have multiple views.  I only create the buttons with rules and conditional formatting once, then I copy them all over the form.  This always works for me, so I don't know why it is thought not to work.  Is it because I only use "Rules and Custom Code" instead of the built-in Submit function?  I only give my button the name "Submit," but I don't actually use the built-in submit functionality.  I only use rules...

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.