Thursday, May 27, 2021

OIC - Fetch name and value params from a input string

Requirement:  

I have a input string called "report path" having multiple paramters appended with semicolon(;). So we have to fetch all name value parameters from the input string and save in a csv formated file for further use.

Example:

Input: abcreport;a=b;c=d

Output:

Csv file

Name= a Value=b

Name=c Value:d

Code steps:

Step1: Assign variable:

  • loopCount= 1.0
  • maxCount=returnCountOfString($reportPath,";")
  • loopCountString= 1.0

Note:oic-javascript-return-count-of-string

Step2: whileCount: loopCount <= maxCount

  • parameterName= returnParamter($reportPath, ";", "=,"Name", $loopCountString)
  • parameterValue = returnParamter($reportPath, ";", "=,"Value", $loopCountString)

Note: use this oic-javascript-find-name-and-value.

Step3: take a stage and Write file:

C1: parameterName

C2: parameterValue

Apend to existing file : yes

Step4: loop increment

If loopCountString = maxCount then

loopCount = loopCount + maxCount

Else

loopCountString = loopCountString +1


Screenshots:
















No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...