機械翻訳について

インポート・マップ式の関数

1つ以上のソース・データ列を使用して式を作成し、その式をマスター・データ属性にマップできます。 たとえば、マスター・データの「詳細摘要」属性には、ソース・データの「品目および摘要」列からの情報を含めることができます。

式の作成に使用する関数は、文字列、数学、汎用およびカレンダのいずれかのタイプになります。

文字列関数

式の作成に使用できる文字列関数を次の表に示します。

名前

摘要

toDate

文字列値を、コンテキスト内の日付書式と一致する日付書式の日付値に変換します。

toDate(expression)

Attribute1 = 10-31-1997、書式= MM-dd-yyyyの場合

ロケールに応じて、toDate([Attribute1]) = 10-31-1997または1997-10-31

toDateTime

文字列値を、インポート・マップのタイムスタンプ書式と一致するタイムスタンプ書式のタイムスタンプ値に変換します。

toDateTime(expression)

Attribute1 = 2000.01.31 12:01:01、書式= yyyy.MM.dd hh:mm:ssの場合

ロケールに応じて、toDateTime([Attribute1]) = 2000.01.31 PSTまたは12:01:01 PM

concat

指定された文字列を連結します。

concat(expression1, expression2,.....expression30)

Attribute1 = Item、Attribute2 = Descriptionの場合

concat([Attribute1],[Attribute2]) = ItemDescription

length

指定された文字列の長さを文字数で返します。 長さには空白文字は含まれません。

length(expression)

Attribute1 = Itemの場合

length([Attribute1]) = 4

split

指定されたデリミタで文字列を分割し、文字列の指定された部分を返します。 デリミタには、任意の正規表現または特殊文字を使用できます。

split(expression, delimiter, partNumber)

Attribute1 = Item#Descriptionの場合

split([Attribute1],#,2) = Description

substring

元の文字列の指定された文字数から始まる、指定された長さの新規文字列を作成します。

substring(expression, startPosition, length)

Attribute1 = ItemDescriptionの場合

substring([Attribute1],0,4) = Item

insert

指定された文字列を、別の文字列の指定された場所に挿入します。

insert(expression1, integer1, expression2)

Attribute1 = ItemDescription、Attribute2 = Longの場合

insert([Attribute1],5,[Attribute2]) = ItemLongDescription

newLine

指定された文字列の末尾に改行文字を挿入します。

newLine()

Attribute1 = Item、Attribute2 = Descriptionの場合

concat([Attribute1],newLine(),[Attribute2]) =

Item

Description

uppercase

文字列を大文字に変換します。

uppercase(expression)

Attribute1 = itemの場合

uppercase([Attribute1]) = ITEM

lowercase

文字列を小文字に変換します。

lowercase(expression)

Attribute1 = ITEMの場合

lowercase([Attribute1]) = item

数学関数

式の作成に使用できる数学関数を次の表に示します。

名前

摘要

random

0から1までの疑似乱数を返します。

random()

Attribute1 = 25の場合

random()*([Attribute1]) = random number

round

数式をn桁の精度に端数処理します。

round(expression, integer)

Attribute1 = 10.45の場合

round([Attribute1],0) = 10

汎用関数

式の作成に使用できる汎用関数を次の表に示します。

名前

摘要

nvl

expression1の値が空白の場合はexpression2の値を返し、そうでない場合はexpression1の値を返します。

nvl(expression1,expression2)

Attribute1 =空白、Attribute2 = Item、Attribute3 = Descriptionの場合

nvl([Attribute1],concat([Attribute2],[Attribute3])) = ItemDescription

decode

expression1の値がexpression2の値と等しい場合はexpression3の値を返し、そうでない場合はexpression4の値を返します。

decode(expression1,expression2,expression3,expressiosn4)

Attribute1 = Item、Attribute2 = Item、Attribute3 = Match、Attribute4 = No Matchの場合

decode([Attribute1],[Attribute2],[Attribute3],[Attribute4]) = Match

toString

オブジェクトを文字列表示に変換します。

toString(expression)

Attribute1 = 4の場合

toString([Attribute1]) = 4

getCustomObjectValue

指定されたカスタム・オブジェクト属性および式に対応するカスタム・オブジェクト属性の値を返します。

getCustomObjectValue(customObjectApiName,customObjectReturnAttributeApiName,customObjectQueryAttributeApiName1,expression1,...customObjectQueryAttributeApiNameN,expressionN)

CustomObject = Manufacturer DetailsCustomObjectAttribute1 = Media Inc.CustomObjectAttribute2 = MICSV Column1 = MIの場合

getCustomObjectValue("CustomObject","CustomObjectAttribute1","CustomObjectAttribute2",[CSV Column1]) = Media Inc.

getCategory

特定のカタログ・マッピングの指定された自カテゴリに対応するカテゴリを返します。

getCategory(catalogMappingName,fromCategoryCode)

If Attribute1 = Spoke Mapping, Attribute2 = Ceramic_Faucets

getCategory([Attribute1],[Attribute2]) = Faucets

Faucetsは、カタログ・マッピングSpoke Mappingの自カテゴリCeramic_Faucetsに対応する至カテゴリ・セットです。

getItemClass

特定のカタログ・マッピングの指定された自カテゴリに対応する品目区分を返します。

getItemClass(catalogMappingName,fromCategoryCode)

Attribute1 = Supplier Mapping、Attribute2 = Peripheral_Devices、および

getItemClass([Attribute1],[Attribute2]) = Electronics

Electronicsは、カタログ・マッピングSupplier Mappingの自カテゴリPeripheral_Devicesに対応する品目区分セットです。

カレンダ関数

式の作成に使用できるカレンダ関数を次の表に示します。

名前

摘要

currentDate

現在の日付を返します。

currentDate()

01/17/2017

currentTime

現在の日付と時刻を返します。

currentTime()

01/17/2017 10:30:45 AM

dayName

指定された日付の曜日の名前を返します。

dayName(expression)

Attribute1 = 01/17/2000の場合

dayName([Attribute1]) = Monday

dayOfMonth

指定された日付の月初からの日数を返します。

dayOfMonth (expression)

Attribute1 = 01/17/2017の場合

dayOfMonth([Attribute1]) = 17

dayOfWeek

指定された日付の週の始まりからの日数を返します。

dayOfWeek (expression)

Attribute1 = 01/17/2017の場合

dayOfWeek([Attribute1]) = 2

dayOfYear

指定された日付の年初からの日数を返します。

dayOfYear (expression)

Attribute1 = 01/17/2017の場合

dayOfYear([Attribute1]) = 17

month

指定された日付の月を数値で返します。

month(expression)

Attribute1 = 01/17/2017の場合

month([Attribute1]) = 1

year

指定された日付の年を返します。

year(expression)

Attribute 1 = 01/17/2017の場合

Year([Attribute 1]) = 2017