English 中文(简体)
• 如何填写基于InfoPath另一个清单价值的清单
原标题:How to fill up a list based on another list s value in InfoPath

我有一个国家价值观的清单。 这一清单在下降。 各州的情况再次下降。 当我选择国家时,国家下降应该与选定国家的居民相聚。 我是新来的,我不知道如何做到这一点。

在C# I中,我想写一下类似的东西(请无视yn子):

if(state.country == countryDropDown.SelectedValue)
StateDropDown.add(State);

在InfoPath,我如何能够这样做?

问题回答

在国家名单中,增加一个过滤器,以便你只显示属于该国的国家。 http://koobarspoint.blogspot.com/cading-drop-downs-with-infopath-2010.html” rel=“nofollow” http://koobarspoint.blogspot.com/ 201006/cascading-drop-downs-with-infopath-2010.html。 (不需要后面的代码)

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 -

string strCountry=this.maindatasource.createnavigator().selectsinglenode("xpath of country dropdown",namespacemanager).value;

SPList oList = web.Lists["Name of List"];
SPQuery oQuery = new SPQuery();

oQuery.Query = "<Where><Eq><FieldRef Name= column name which contains countries  /><Value Type= Text >" + strCountry + "</Value></Eq></Where>";

SPListItemCollection oListItemCollection = oList.GetItems(oQuery);

foreach (SPListItem Item in oListItemCollection)
{                                           
   root.SelectSingleNode("xpath of field inside repeating table",NamespaceManager).SetValue(Item["Name of column which holds state"].ToString());

}




相关问题
InfoPath: How to display a third column of a datasource?

I have an InfoPath 2007 browser-enabled form that has a datasource with three columns, let s say columns A, B, and C. I have a dropdown that is keyed to column A and displays column B. Column C ...

Using Rich Text Box with Infopath and Webservices

I would like to retrieve and submit data that contains Rich Text to a webservice but I am having problems with the particular datatype on the webservice side. If I have a simple string type coming ...

A. 总结信息表格的运行情况

背后的《信息卫生法》可以找到该表格运行的背景。 因此,我们重新审视了InfoPath客户本身,还是看其是否在InfoPath表格服务器下运行。

Hyperlink disappears when form template saved

I have an InfoPath form with several fields on, the problem is that one of the fields is a hyperlink and every time I save the form template, close it and open it again the hyperlink is gone. I know ...

Infopath 2003: Enabled browser forms

I was wondering whether forms designed through infopath 2003 have the capability to be opened and fille out through a browser (using infopath forms services). While looking at the Tools --> Form ...

Read web.config from browser-enabled InfoPath form

I ve built in C# a dll that accesses the appSettings section from the web.config file in the InetpubwwwrootwssVirtualDirectories80. I do it the way it was described by Microsoft Community here. I ...

Auto Fill the Time in infopath

I would like to know if there is a way that I can have the time be auto filled when the user enters 10 I then want it to show 10:00. how can I do this?

热门标签