Skip to Content

Passing parameters to Functions in BODS

May 10 at 12:26 PM


avatar image
Former Member

Hi Experts,

Can you explain the purpose of passing parameters to Function in BODS scripts?

And also about the significance of return parameters.

Thanks in advance!!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Rajan Burad May 16 at 04:40 AM

Hello Harish,

Parameters are the values that are passed to a particular function. These parameters then manipulate the data and return the result.

Consider the below example:

replace_substr() accepts 3 parameters as input values.

Consider $ROOT_FILE = 'RAJAN' as the input string. User want to replace letter 'A' with 'Z', since the function requires 3 parameters: Input String which needs to be manipulated, which character/value needs to be modified, what value should be replaced in the input.

So in the above string 'A' needs to be replaced with 'Z'.

Upon execution:

About return parameters, the function returns some output value. Here the returned string is 'RZJZN'.

Hope it helps!


1.png (2.6 kB)
2.png (1.5 kB)
3.png (3.3 kB)
10 |10000 characters needed characters left characters exceeded