How do I create dynamic button text based on fields in Infopath. - InfoPath Dev
in

InfoPath Dev

How do I create dynamic button text based on fields in Infopath.

Last post 05-13-2009 05:26 AM by TiltnSpill. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-12-2009 08:21 AM

    How do I create dynamic button text based on fields in Infopath.

    Good morning,

    Background information on form.  Form is a document that has to get approved by several different people.  I've created  a single "submit" button control with different functions based on rules set in the control.

    What i'd like to do now is create a dynamic label for this button based on field values set in the form. 

    Example - Manager opens form and has to submit form to HR (user role = manager).  Instead of saying "submit" I'd like it say "submit to HR".  Then when HR opens the form I'd like it to say "Submit to Upper management".

    I'm not sure if this is possible but I don't want to create 12 different submit buttons that have to be hidden based on conditional formatting.

    If I can get help started, I think I can complete it!  Any help would be greatly appreciated.

  • 05-13-2009 05:19 AM In reply to

    Re: How do I create dynamic button text based on fields in Infopath.

    The simplest solution is exactly what you have described: insert 12 different submit buttons and add conditional formatting to each of them, in order to hide/show them as you need. Why do you want to avoid this? It's quite a common codeless strategy in InfoPath.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 05-13-2009 05:26 AM In reply to

    Re: How do I create dynamic button text based on fields in Infopath.

    I found a solution, thanks ErnestoM.

    I wanted to avoid this because I've done it before and wanted to try a something different to see if it was "simpler".

    What I ended up doing is creating one submit button and one text box.  Submit button gets label from value of text box.  Text box value is altered by various rules, submit changes based on rules.

    It's turning out to be about a big a hassle as 12 submit buttons honestly though :).  I'll let you know which solution I like better!

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