DeleteData
DeleteDE
InsertData
InsertDE
Lookup
LookupOrderedRows
LookupRows
UpdateData
UpdateDE
UpsertData
UpsertDE
データエクステンションから、指定した値にフィールドが一致する行セットを取得します。追加のフィールド値ペアを AND 句の一部として指定できます。この関数は、最大 2000 行を返します。返される行の数または順序を詳細に制御するには、LookupOrderedRows() 関数を使用します。この制限はスクリプトのパフォーマンスの向上に役立ちます。
LookupRows(1, 2, 3)
| 序数 | 型 | 説明 | |
|---|---|---|---|
| 1 | string | 必須 | データエクステンションの名前 |
| 2 | string | 必須 | 値の取得元の列の名前 |
| 3 | 文字列または配列 | 必須 | 列値を照合するために使用する値 |
1<script runat="server">
2 var dataRows = Platform.Function.LookupRows('CustomerData','Company','exampleCompany');
3 if(dataRows && dataRows.length > 0) {
4 for(var i=0; i<dataRows.length; i++) {
5 Platform.Response.Write(dataRows[i]["Email"]);
6 }
7 }
8</script>1<script runat="server">
2 var dataRows = Platform.Function.LookupRows('CustomerData',['FirstName','LastName'],['Angela','Cruz']);
3 if(dataRows && dataRows.length > 0) {
4 for(var i=0; i<dataRows.length; i++) {
5 Platform.Response.Write(dataRows[i]["Email"]);
6 }
7 }
8</script>