Drop down List Box - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Drop down List Box

Last post 03-04-2011 05:10 AM by jaybranch. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 02-28-2011 07:07 AM

    Drop down List Box

    Ladies and Gents,

    I have added a drop down list box to my form...  when the form loads the user is presented with a choice of e-mail addresses to pick from.

    All is fine and they can submit the form, however when the form is accessed, the data from the drop down box is missing... i.e. the field is blank.    If the form is saved, the data that appeared in the Sharepoint list is also lost.

    Can you please tell me the process of how we can retain the choice of email address in this drop down when the form is opened after submission.  It shouldn't need to change once it's been submitted.

    Thank you all !!

     

    James

    Filed under:
  • 02-28-2011 02:13 PM In reply to

    Hi, James - have you looked into adding a condition to your form load rule so it doesn't run when your field is not blank, i.e. the user has already made a selection?

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

  • 03-01-2011 03:57 AM In reply to

    Hi Jennifer,

    At the moment, when the form loads for a user the drop down is blank... so they have to choose an e-mail address from the list (This is until we can work out a way of getting the manager e-mail into this box automatically - any ideas??  I've been told we might be able to use a formula to concatenate the box above which shows the managers Firstname Surname, and get this to say firstname.surname@email.com in the email box, but I don't know how to do this!)  Do you?  :)

    Anyway...  when the user puts all the information on the form (prices, part numbers etc) and then submits it, the form is saved to our sharepoint library and all the data appears in the columns ok, but as soon as the form is opened (from the library where it has been saved too) the drop down email list is blank.  Everything else is ok, except this box!  So, if it is saved again, the data in the cell, along with the list data is gone.  

    What would I need to put as a rule in order for this data to be retained when the form is opened after submission?

     

    Thanks Jennifer!

     

    James 

     

     

  • 03-01-2011 08:39 AM In reply to

    Hi, James - look at your rules and see what you have for this field--if you have a Form Load rule that's saying the user must select the manager alias when the form is opened, it's expected that field would be blank when it's opened after it has been submitted. Try adding a condition to the rule so it only runs when that field is blank.

    As far as pre-populating manager alias in the form, if you have ManagerFirstName and ManagerSurname fields and emails are always firstname.surname@email.com, you can concatenate these fields in your email submit data connection and submit To: concat(ManagerFirstName, ".", ManagerSurname, "@email.com"). If you need Manager Email as a field in your form, you could set a default value on that field, using the same concat(ManagerFirstName, ".", ManagerSurname, "@email.com").

    What happens when if there's an alias that is outside the general convention of firstname.surname@email.com? The email will fail. You should also look into Qdabra's Active Directory Web Service to return manager info for the user, and user info if you're not already pulling that. Reduce the potential of error from human input and needing to update multiple lists/resource files as people leave the org or names change by relying on AD.

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

  • 03-02-2011 12:05 AM In reply to

    Hi Jennifer,

     

    Thanks for your great replies.  We did look at doing the concat of the Firstname and Surname fields, however we thought it might be better if we simply changed a field in AD (We picked IP Phone, which we know we will never use) and added the e-mail addresses manually.  Luckily for us we only have 40 users! 

    Then, we simply added another field to the form with an AD lookup in the VB code and it pulls the e-mail address across to the form.

    I supposed the concat would've worked ok too really...  as the address will never change (it will always be firstname.surname@email.com) so if the way we've set it up causes any issues, we'll revert back to the concat method.

    Question - can you concat just 'one' field, or do you have to use two?  The reason I ask is that on the form we only had one name field, which pulled back the name of the user from AD, i.e. James Branch, but only into one field, not two seperate ones for firstname and surname.  I wasn't sure if you could concat just one field?

    Thanks again Jennifer,

    Best,
    James

  • 03-02-2011 10:24 AM In reply to

    Wonderful, you’re pulling email from AD.

    Concat does work with one field but the function does require two or more strings. It doesn’t care if those are fields or manually typed in. Back to the scenario of manager’s complete name in one field, you could use substring-before to get the first name to the first space, and substring-after to get the name after the space, thus splitting “James Smith” into James and Smith so the email concat formula I provided would work.The problem you will run into with trying to split on the space between first and last names is when you have “Mary Sue Smith”. You’ll end up with Mary.Sue Smith. And think about what happens with “Werner Von Braun” in this type of formula. You’d also have to use translate to remove all the spaces. 

    Splitting first name and last name from one field is a risky approach so I’m glad you have another option but have been able to explore the concat function more.

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

    Filed under:
  • 03-03-2011 12:54 AM In reply to

    Hi Jennifer,

    Thanks again for your replies, you have been extremely helpful! 

    Kindest regards,

    James

    @jaybranch (Twitter)

  • 03-03-2011 05:00 AM In reply to

    Hi Jennifer,

     

    Maybe you can help me again with a VERY quick question.  My AD values are being pulled from AD on my form.... great!  However, when a form is submitted to the library, when (lets say) an approver opens the form to approve it, HIS/HER Ad details replace the values that were on the form when it was submitted.

    For example, if I submit a form MY name would be the requester, along with MY manager name etc.  However, if MY manager opens the form in the library, HIS details replace mine on the form!

    What can I do on the form that will keep the values that are submitted on the form when it is opened again??

    Thanks for your help!!

     

    James

     

  • 03-03-2011 08:57 AM In reply to

    Hi, James - it sounds like this AD field is populated with a form load/open rule - every time the form is opened, the field is populated with the current user. Add a condition to the rule so it only runs when that field is blank. That way when I create a new form, my info is populated. My manager opens the form and the rule does not run because my info is already populated. Here's a similar forum post - http://www.infopathdev.com/forums/p/13948/49581.aspx

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

  • 03-03-2011 09:01 AM In reply to

    Hi Jennifer,

    Thanks for that.  Would it matter that my AD info is pulled to the form on a loading event using code??

    Would the rule over-ride the code?

    James

  • 03-04-2011 05:10 AM In reply to

    Hi Jennifer,

    We used the code 'If ([Me.New]) Then' and this works great!  Now, when the form is submitted, the AD code doesn't change when the form is opened by another user!  :)

    Thanks for ALL of your great advice!

    James

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