次の方法で共有


FileSubmitConnection.Filename プロパティ

定義

XPathTypedValueフォームがオブジェクトによって送信されたときに現在のフォームに指定されるファイル名に評価される をFileSubmitConnection取得します。

public:
 abstract property Microsoft::Office::InfoPath::XPathTypedValue ^ Filename { Microsoft::Office::InfoPath::XPathTypedValue ^ get(); };
public abstract Microsoft.Office.InfoPath.XPathTypedValue Filename { get; }
member this.Filename : Microsoft.Office.InfoPath.XPathTypedValue
Public MustOverride ReadOnly Property Filename As XPathTypedValue

プロパティ値

XPathTypedValueフォームが送信されるときに指定されるファイル名に評価される 。

次の例は、FileSubmitConnection オブジェクトの Filename プロパティを使用して、フォームをデータ接続に送信するときに使用されるファイル名を表示しています。

FileSubmitConnection submitConnection = 
   (FileSubmitConnection)(DataConnections["SharePoint Library"]);
MessageBox.Show (submitConnection.Filename.ToString());
Dim submitConnection As FileSubmitConnection = 
   DirectCast(DataConnections["SharePoint Library"], _
   FileSubmitConnection)
MessageBox.Show (submitConnection.Filename.ToString())

注釈

FileSubmitConnection クラスの Filename プロパティの値はオブジェクトとしてXPathTypedValue返されます。これは、XPathTypedValue クラスのメソッドを使用してSetStringValue(String)リテラル文字列を指定するか、XPathTypedValue クラスの プロパティを使用して XPath XPath 式を指定することで設定できます。 詳細とコード サンプルについては、「 XPathTypedValue クラス」トピックを参照してください。

ファイル名拡張子 ".xml" が含まれていない場合は、この拡張子が文字列に追加されます。 Filename プロパティが null 参照 (Visual Basic では Nothing) の場合、フォームには送信時に "Form.xml" という名前が付けられます。

concat("Status Report -", field1) などの XPath 式がデータ接続の定義時にデータ接続ウィザードの [ファイル名] ボックスに指定されている場合は、次の例に示すように、XPathTypedValue クラスのプロパティを使用XPathしてその式を返すことができます。

FileSubmitConnection submitConnection = 
   (FileSubmitConnection)(DataConnections["SharePoint Library"]);
MessageBox.Show (submitConnection.Filename.XPath.ToString());
Dim submitConnection As FileSubmitConnection = 
   DirectCast(DataConnections["SharePoint Library"], _
   FileSubmitConnection)
MessageBox.Show (submitConnection.Filename.XPath.ToString())

このメンバは、現在開いているフォームと同じドメインで実行中のフォーム、またはクロスドメインのアクセス許可が与えられたフォームだけがアクセスできます。

この型またはメンバーには、Microsoft InfoPath Filler または Web ブラウザーで開いたフォームで実行されるコードからアクセスできます。

適用対象