Depending drop-down lists. HELP please! - InfoPath Dev
in

InfoPath Dev

Depending drop-down lists. HELP please!

Last post 07-07-2016 11:14 PM by Bible_black. 18 replies.
Page 1 of 2 (19 items) 1 2 Next >
Sort Posts: Previous Next
  • 06-29-2016 05:52 AM

    Depending drop-down lists. HELP please!

    I have two drop-down lists. I need them to depend on each other. I have for example 30 values in the second list and 5 in the first one. When i choose in the first list any value, there should be for example 20 from 30 values only and other shouldn't be displayed in the second drop-down list. And so on with all the 5 values in the first list. For each value in the first list there should be different and some same values in the second list. I know that XML files can help me but i can't write the correct one, please help me,

  • 06-29-2016 12:31 PM In reply to

    Re: Depending drop-down lists. HELP please!

     Okay - so you would like this data to be in an XML file  instead of using SharePoint lists for this? How often will this data change?

    Hilary Stoupa

  • 06-29-2016 11:26 PM In reply to

    Re: Depending drop-down lists. HELP please!

     I'm a new user in infopath, so i don't know all the specifications of it. If you know how it may work without XML, i'm so glad if you help me. Look, I found one solution of my problem, but it is rather bad. I need one item to have 5 values and another one to have 46 values. For 2 of 5 values i need all the 46 in the second. I mean when i choose in the first drop-down list 2 of 5 values, in the second one i should have all the 46 values as a drop-down list. Then if i choose the third value in the first list i shold have 39 values from 46 in the second. 7 of 46 just sholdn't be visible. And the fourth of 5 in the first list shold give me only 7 from 46 to be visible in the second list. My solution is to make 4 drop-down lists, the first have my 5 values and it doesn't change, but another 3 lists are visible or not depending on the value of the first list. I use conditional formatting to hide 2 of 3 unwanted lists. It is a rether bad solution because i need the second list to have one item-name, not three, that's why i nned help. I saw one template in infopath with such lists and the logic of it is given there in XML file, but i'm bad in XML, so i can't do like this, i tried, but it doesn't work. I can attach XML file of template or maybe you could tell me some kind of solution without XML, with SharePoint lists or smth like this. I really hope that you understand what i need and appreciate your answers, thanks!

  • 06-29-2016 11:35 PM In reply to

    Re: Depending drop-down lists. HELP please!

     My form is for all the ministrys and some governmental structures in my country, it is a template for their reports, so the data will not change. These two fields (lists) will just have different values for each ministry in their reports.

  • 06-30-2016 08:33 AM In reply to

    Re: Depending drop-down lists. HELP please!

    If the data is not going to change, may as well use an XML file for it - feel free to attach your template w/ your work around to a reply (under the options tab) and I'll take a look in the next day or so.
    Hilary Stoupa

  • 06-30-2016 08:58 AM In reply to

    Re: Depending drop-down lists. HELP please!

    Thank you very much, i'm moving in the another country now for three days, i'll get back to work on monday, i'll be so glad if you answer me on monday, when i attach my form. I think our time zones are really different, so check it please on monday ;) I'm a new one guy in infopath, so i don't know many features. I don't even know what is SharePoint list, i tryed to understand it today, but still. And i hope that it is not gonna be a problem that my form is on russian language, i'm from Belarus) Best regards!
  • 06-30-2016 09:01 AM In reply to

    Re: Depending drop-down lists. HELP please!

    Sure - I'm not going to be around on Monday (US holiday) but I'll take a look early next week.
    Hilary Stoupa

  • 07-04-2016 02:19 AM In reply to

    Re: Depending drop-down lists. HELP please!

      Here is my .xsn template. It's on russian as i mentioned before. Look, when you open it, you find on the top of the form such a drop-down list with "Выбор..." value. And there is an empty space under it in the next row. If you change the meaning of drop-down list, there will appear another drop-down list there on empty space. And when you change values of the first one, the values of the second will change too. You'll see it while you're not in a constructor mode. Then, as i said, if you go to constructor mode, you see'll see that there are just 3 hidden drop-down lists that appear according to the value of the first one. I used conditional formatting there. So, how can i do such a task using only one list, not 3? It should display different values according to the value of the first list. Thx!

     

    P.S. If i'm still not annoying, can i ask another question. I think its very simple for you, but i can't find the answer. On the bottom of this template there is a repeating table. There is such a button as "Добавить этап". It creates a new row in the repeating table. I need another button near this one called "Delete" to delete the highlighted row of this repeating table. I've found the solutions on C# but i can reach only js handler, don't know how to get to C# tools in InfoPath.

  • 07-05-2016 02:07 PM In reply to

    Re: Depending drop-down lists. HELP please!

    As to your code question - what version of InfoPath are you using? If 2013, you need VS 2012 for writing managed code....
    Hilary Stoupa

  • 07-05-2016 11:19 PM In reply to

    Re: Depending drop-down lists. HELP please!

     No, i use IP 2007. I try to use jscript for solving my tasks. I can't find how to delete one new row in a repeating table using button, i tried

    XDocument.view.ExecuteAction("xCollection::remove", "группа11_684"), but it doesn't work. It's said that "bstrAction value is invalid for calling View.ExecuteAction for this highlighted fragment." I don't understand why it doesn't work, because the button that adds a new row in this repeating table looks like:

     function CTRL1354_8::OnClick(eventObj)
    {
    XDocument.View.ExecuteAction("xCollection::insert", "группа11_684");
    }

    And i still don't know how to make those depending drop-down lists.

  • 07-05-2016 11:28 PM In reply to

    Re: Depending drop-down lists. HELP please!

     Speaking about button "Delete" i've just made this button on the row of my table and now it works, i deletes the row in which the button is. But i wanted to make i button on the top of the table that would delete highlighted row. But I can leave like this, that's a solution. But those drop-down lists are my main problem. I need only one item for the first list and one for the second, where visible values are different in the second list depending on the value of the first list. Could you help me with this?!

  • 07-06-2016 07:58 AM In reply to

    Re: Depending drop-down lists. HELP please!

    I haven't had a chance to look at your form yet, it is on my list for today.
    Hilary Stoupa

  • 07-06-2016 10:08 AM In reply to

    Re: Depending drop-down lists. HELP please!

    So - I see all three dropdowns are bound to different fields - is that intentional / necessary?
    Hilary Stoupa

  • 07-06-2016 10:19 AM In reply to

    Re: Depending drop-down lists. HELP please!

    Here is a simple sample that uses an XML file for both the parent and child dropdowns. You can go to the resource files and save the XML file out that is used so you can see the structure - basically, the first dropdown gets it data from the "parent" node, and is set to display unique items only. The second dropdown has a filter on it to only display items where the parent matches the item selected in the first dropdown. Hopefully this will help with your XML structure - I do see you have other XML files in the form for data sources - so you should be able to combine those into one and add a node to your repeating group for the parent data. However, if you have to have data stored in different fields based on the selected item in the first dropdown, you'll want to stick with your current approach.
    Hilary Stoupa

  • 07-07-2016 01:07 AM In reply to

    Re: Depending drop-down lists. HELP please!

     Thank you so much for help, i'm sure that's what i need! But i'm such a "lowskill" in .xml so i don't understand how to attach file to the fields. Look, could you tell me what did you write by yourself in that sample that you've sent to me. I've rewrite "data.xml" and just have made it with my parents, ids and names. But i think that i should do smth with Namespaces or maybe i should rewrite file "sampledata.xml" as well?

     

    When i just create similar file "data.xml" with my values (I'll attach it) and try to add it in the dropdowns i see an error. Its said that there is an inadmissible symbol in XML-text. And the error is where the russian letter firstly appear. I think i miss smth, but i'm sure that the solution is very close already.

    Thanks & Regards, Paul.

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