Umer
Umer

Reputation: 137

Concating String with parameter in BIP RTF template

In my BIP RTF template i am receiving a string in a parameter(say Clinic) and in the IF condition i have to match the parameter($Clinic) with the XML tag (ssRohClinicFacilityName).

Now problem is, incoming parameter is as a truncated string and for a accurate match we have to append a string with the parameter like below:

$Clinic + " Clinic"

As reports are being generated from Siebel application so there is a limiation on Siebel side on the number of characters to be sent in the parameters.

To achieve above requirement I tried multiple options but none worked for me yet.

I have tried following so far:

Here is my existing if condition:

<?if:( xdoxslt:format_date(ssAssignmentDate, 'yyyy-mm-dd','mm/dd/yyyy', $_XDOLOCALE, $_XDOTIMEZONE))>= (xdoxslt:format_date($StartDate, 'yyyy-mm-dd','mm/dd/yyyy', $_XDOLOCALE, $_XDOTIMEZONE)) and (xdoxslt:format_date(ssAssignmentDate, 'yyyy-mm-dd','mm/dd/yyyy', $_XDOLOCALE, $_XDOTIMEZONE))<= (xdoxslt:format_date($EndDate, 'yyyy-mm-dd','mm/dd/yyyy', $_XDOLOCALE, $_XDOTIMEZONE))?>

My sample RTF and XML files.

Upvotes: 0

Views: 7298

Answers (1)

Ranjith R
Ranjith R

Reputation: 1589

I think it will be easier for you if you just use wildcards for the comparison.

Refer: https://blogs.oracle.com/xmlpublisher/wildcards

& https://www.quackit.com/xml/tutorial/xpath_string_functions.cfm

You could search for

starts-with(ssRohClinicFacilityName, $Clinic)

--New content---

It can be used with and if function, or even without. Here is what I tried:

enter image description here

And here are the results.

enter image description here

<?starts-with(ssRohClinicFacilityName, $Clinic)?>

With an if condition

<?if:starts-with(ssRohClinicFacilityName, $Clinic)?> 
'MATCHED'
<?end if?>

I suggest you try testing this part separately, there could be other errors in the if statement which is causing incorrect output.

Upvotes: 0

Related Questions