Populate textbox based on DDL control - InfoPath Dev
in

InfoPath Dev

Populate textbox based on DDL control

Last post 11-30-2006 11:27 AM by Matt Faus. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-29-2006 07:00 PM

    Populate textbox based on DDL control

    Hi,

    I'm having a problem loading values from a DDL to a text box. The form connects to a Secondary Data source.

    The form structure is:

    Main
    > myFields
    > TestData (Repeating)
    - TestScenario
    - TestValue

    The Secondary Data comes from a SharePoint list with the following data structure:

    TestData
    - ID
    - Scenario
    - Value

    In the form I created a repeating table with Scenario as a DDL (Drop down List) and Value as a Textbox. The DDL is linked to the secondary data source TestData.Scenario to display all the scenarios.

    My goal is to select the correct Value for each row of the repeating table as I select the scenario from the the DDL.

    I set up a rule called 'Set Value' on Scenario as follows:
    Condition > None - This rule always applies
    Set a field's value > TestValue = @Value[current()/TestScenario = @ID]

    I am able to get this to work as long as I do not put the "current()" filter. If I add this filter then nothing comes back in the Text box. When I don't add the current filter, values of preceeding rows are affected by the subsequent changes to Scenario.

    What am I doing wrong? Is this even possible? Any help will be appreciated.

    Nara

    Thanks
    Nara Chilluvuri
  • 11-29-2006 08:29 PM In reply to

    Re: Populate textbox based on DDL control


    Solved the problem by using a temporary hidden field which takes the value from current DDL and uses it to load text into Value text box of current row.

    Got help from post:
    http://aspalliance.com/497_InfoPath_Populating_Fields_from_DropDown_Selection

    Did it all using InfoPath. No need for Visual Studio as indicated in that example.

    Cheers
    Nara
    Thanks
    Nara Chilluvuri
  • 11-30-2006 11:27 AM In reply to

    Re: Populate textbox based on DDL control

    Hey Nara,

    Good to see you got everything figured out! Thanks for sharing the link!
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.