No value returned from data connection - InfoPath Dev
in

InfoPath Dev

No value returned from data connection

Last post 09-28-2015 02:05 PM by Jay@Work. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-27-2015 05:12 PM

    No value returned from data connection

    I have done this a couple of times in the past and each time I have struggled to get it to work first time. Now I can't get it working at all!
    Simple scenario, in my form (browser based on sharepoint 2013) I have a drop down that is populated using the title field of a list, I wish to populate a text box with the value associated with the selection.


    The title is a name(single line of text with the internal columns name "title") and the value I wish to return is area (single line of text)
    When the user selects a value from the drop down I need to be able to retrieve that associated area and put it into the text box called HS_Dept.
    In the past when I've had a problem with this it has been because I've got my formula back to front or I've used the wrong query/data field but I have double checked and think it is how it is.

     So, action on the drop down list (fires when value changes), drop down name is HSRep
    Step 1 Query using a data connection <list name>
    Step 2 Set a fields value.

    Update field (Main) HS_Dept with the value (Secondary/Datafields) Area
    Where (Secondary/Datafield) Name = (Main) HSRep

    The box remains empty when I select a value from the drop down.
    I know it is trying as the page flickers and I see Fiddler traffic.
    I know that the data connection to the other list is ok as it is populating the drop down

    TIA 

  • 09-27-2015 10:34 PM In reply to

    Re: No value returned from data connection

    Set up the secondary connection, make sure the Title and Area fields are checked so the form can see the information.

    Find the field you want this data to be triggered off of, create a rule, set a fields value. Select the field to change.

    Now in the value field click the Fx button.

    Insert field or group.

    Using the drop down select the secondary data source, now expand the dataFields group until you see the field you want to take data from, "Area" I believe it would be from your description.

    Highlight the field now click Filter Data. In the first drop down choose "Select a field or group", using the drop down at the top again select the secondary connection only this time choose the other field associated with "Area", sounds like it may be called "Title" in your case.

    Keep the middle box as "is equal too".

    Select the 3rd drop down box, choose "Select a field or group", this time choose the Main source not the secondary and highlight the dropdown field on your current form that is populated off the secondary source.

    Okay your way all the way back out of it. Now test the form, use the dropdown it should go out to the secondary source and try to match the form dropdown to the secondary source dropdown, where it matches it should pull the Area data and change the value of the field as specified. Hope that helps.

  • 09-28-2015 02:05 PM In reply to

    Re: No value returned from data connection

    Thanks, you almost have my scenario correct except the comparison.

    I have a list called HSReps, in that list is name, area and email.
    The name field populates the drop down box in my form called HSRep. This is the secondary connection.
    The user selects a name and then I want to populate HSDept with the value of Area from the HSReps list.

    The filter is where HSRep = Name
    If I can use SQL as an example to show what I need to return....

    select area
    from HSReps
    where HSReps.Name = Form.HSRep  

    I already have the secondary connection and the rule in place. 

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