Auto polulate text box based upon dropdown list selection using sharepoint list - InfoPath Dev
in

InfoPath Dev

Auto polulate text box based upon dropdown list selection using sharepoint list

Last post 10-26-2015 04:11 AM by JonThurtell. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-03-2012 07:59 AM

    Auto polulate text box based upon dropdown list selection using sharepoint list

    Ok, I have a pretty good grasp on this, but I will put it out here just in case I am missing something.  My biggest issue is I can get this to work using a forms library but when I use the list form I cannot get it to replicate what the forms library is doing.  We cannot use the forms library here at work, of course I was told this after I created everything in the FL and all was working great.  I recreated the form using lists, and I cannot get this to work.

     

    List name:  BRP Update:      Two simple fileds.   In the list col names:        Update_type             Update_response         

    I created a data connection to the BRP Update List.

    Infopath form:  

    Create Dropdown named:  UpdateType     Drop down contains values from the BRP Update List: Update_type. 

    Create text box named: Response  

    On the dropdown added rule:  Set Fields Value:       Field:  Response

     Value:     Insert field or group; select data connection "BRP update" select Update_response

    Filter:   UpdateType is equal to Update_type (from the data connection)

     

    Now this works beautiful in the forms library, but displays no value when I use it in the list form. 

     My sharepoint guy here is a little stumped....  if anyone as any input this would be great... been staring at this for days now, and cannot figure out anything.... if you need clarification on stuff I will be happy to elaborate more.

     Thanks!

     

     

     

  • 07-03-2012 03:43 PM In reply to

    Re: Auto polulate text box based upon dropdown list selection using sharepoint list

    In your rule - for the value, click the fx button and in the formula editor, check the box that allows you to edit the XPath - and then paste the full XPath in a reply... we might be able to see if there is an issue with the filter.

    Hilary Stoupa

  • 07-04-2012 12:31 AM In reply to

    Re: Auto polulate text box based upon dropdown list selection using sharepoint list

    pmlanning1:
      We cannot use the forms library here at work

    I would appreciate if you share with the rationale behind this
    I am in similar situation and cannot grasp it

    pmlanning1:
    My biggest issue is I can get this to work using a forms library but when I use the list form I cannot get it to replicate what the forms library is doing

    While I do not see any problems to make what you described working, there are big differences between Sharepint List and Library Forms. so one cannot expect to be able to reproduce anything what could have been done in Library Forms.   

    You will get more prompt and efficient help if you provide step-by-step description of what you have done as well as:

    • the edition (2007, 2010)
    • enterprise or non-enterprise
    • Sharepoint Online (Office 365) or in premises Sharepoint
    • etc.

    pmlanning1:
    I created a data connection to the BRP Update List

    Strictly speaking, one can do a data connection manually only to library forms by using a wizard while data connection to sharepoint list forms are done:

    • under the hood automatically,  
    • "submit" connection saving data to a list cannot be removed or edited

    My guess, from your descriptions, is that you have created a second data connection to a listl

    pmlanning1:
    On the dropdown added rule:  Set Fields Value:       Field:  Response

     Value:     Insert field or group; select data connection "BRP update" select Update_response

    Filter:   UpdateType is equal to Update_type (from the data connection)

    From which of data connections?

    Here is how to make it work

    Configure UpdateType  drop-down list to return the ID (instead of Title, by default) in value:

    • Value: d:ID
    • Display name: UpdateType (I renamed it from Title and Infopath insists on it, but really it is UpdatType)

     

    On Response textbox properties click:

    • "fx" button against "Value:" textbox 
    • "Insert Field or Group..." button
    • change in drop-down list to "(Secondary)" data source (from Main), mine was, see in the screenshot,  BPRUpdate_Wizard (Secondary)
      i.e. to data coming from sharepoint list data connection but not empty field in Infopath form (Main),
      i.e. choosing UpdateType under/in Main source

     

     

     There, click button "Filter data..." and make the filter condition so that ID of the Sharepoint list (remeber it is "Secondary") equal to the value of the selected value (I mean value and it is there ID) in UpdateType drop-down list but the latter in Infopath Form (i.e. under "Main" datasource)

     

      Press OK button reasonable number of times (but no less!).

    Eventual formula looks like:

    • UpdateResponse[ID = UpdateType]

     

     or in textbox properties:

     

    That's all - everything should work now without any action rules!

     

    Update:

    Decided to add more screenshots

     

     

     

     

     

     

     

     

     

     

    Gennady Vanin (Novosibirsk) --- Геннадий Ванин (Новосибирск)
  • 07-05-2012 12:43 PM In reply to

    Re: Auto polulate text box based upon dropdown list selection using sharepoint list

    Brilliant! Thank you... that worked perfectly!  :) 

     

  • 10-26-2015 04:11 AM In reply to

    Re: Auto polulate text box based upon dropdown list selection using sharepoint list

     Hi guys,

     

    I have the same scenario:

    Dropdown list populated from SharePoint list need to autopopulate a textbox with the selections corresponding data.in my case the data fields are Funding Source (dropdown) and Income Code (textbox).

    My data conenction is created and my dropdown is populated correctly but no matter which selection I make the text box always populates with the the first income code from the top of the list. I'm building this in SharePoint online.

     Any help greatfully recieved

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