如何根据 InfoPath 中另一个列表的值填充列表
我有一个包含国家/地区价值观的列表。该列表显示在下拉列表中。我还有另一个针对各州的下拉列表。当我选择国家/地区时,州下拉列表中应填充所选国家/地区的州。我是 InfoPath 的新手,我不知道如何实现这一点。
在 C# 中,我会写这样的内容(请忽略语法):
if(state.country == countryDropDown.SelectedValue)
StateDropDown.add(State);
How can I do the same in InfoPath?
I have a list which holds country values. This list is shown in a drop down. I have another drop down for states. When I select the country, the state drop down should be populated with the states of the selected country. I am new to InfoPath and I don't know how to achieve this.
In C# I would write something like this (please ignore syntax):
if(state.country == countryDropDown.SelectedValue)
StateDropDown.add(State);
How can I do the same in InfoPath?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在州下拉列表中,添加过滤器,以便仅显示属于该国家/地区的州。这是一个链接,向您展示如何 http:// koobarspoint.blogspot.com/2010/06/cascading-drop-downs-with-infopath-2010.html(不需要后面的代码)
In the state drop down list, add a filter so that you only show the states belonging to the country. Here is a link showing you how http://koobarspoint.blogspot.com/2010/06/cascading-drop-downs-with-infopath-2010.html (no code behind is required)
如果您的数据在共享点列表中,那么您可以使用 CAML 查询来获取数据
您需要创建重复字段并将该重复字段绑定到 staet 下拉列表。
要根据所选国家/地区获取州/省/地区是 -
if your data is in sharepoint list then you can use CAML query to fetch the data
You need to create repeating field and bind that repeating field to staet dropdown.
To fetch the state based on country selected is -