Skip to main content

Parse a variable and map data to target element



1 comment

  • Official comment
    David Paras

    Here's a high level approach

    1) Create a local variable varID = substring before _ InputField
    This will capture the first segment a
    2) Create a local variable varNameDate = substring after _ InputField
    This will capture segments b and c
    3) Create a local variable varFirstName = substring before _ varNameDate
    This will capture the full company name or the first part of the company name
    4) Create a local variable varSecondNameDate = substring after _ varFirstName
    This will capture the second company name or the secondcompanyname_date5) 5) Create a local variable varDate
    WHEN CONDITION{ contains($varSecondNameDate,'' ) } VALUE=[ substring-after( $varSecondNameDate,'' ) ] OTHERWISE VALUE=[$varSecondNameDate]
    6) Create a local variable varSecondName
    WHEN CONDITION{ contains($varSecondNameDate,'' ) } VALUE=[ substring-before( $varSecondNameDate,'' ) ] OTHERWISE VALUE=['']
    7) Create a local variable varName
    WHEN CONDITION{$varSecondName=''} VALUE=[ $varFirstName] OTHERWISE VALUE=[ concat( $varFirstName, '_' ,$varSecondName ) ]

Please sign in to leave a comment.