Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Replacing the Value in the field

Highlighted
Dominic Almeida
Regular Collector

Replacing the Value in the field

Hi,

I've a request rule implemented in my request type

which passes the value to an oracle function

"fn_validate_fields(val_1, val_2)"

while the syntax at the PPM workbench rule is as follows

select 0,fn_validate_fields('length([REQD.VP.FLD1]'),length('[REQD.VP.FLD2]')) from dual

this was working fine until, I entered the following value

" BU's lack of support "

as you can see it is coming with apostrophe (single quote)

to it came back with an sql error on when i pressed the trnasition button.

I treid the sql replace function within the length function but it didn't work


so the question is

1) is there any sql solution to it?
OR
2) is there any PPM way or rule that can replace the single quote before it is passed to the PL/SQL?


regard - Dom







2 REPLIES
Celil
Esteemed Contributor

Re: Replacing the Value in the field

Hi Dominic, Have a nice day.

Please try this;

select 0,fn_validate_fields(tmptable.new_string),length(tmptable.new_string) from
(
select replace('[REQD.VP.FLD2]','''',' ') new_string
from dual
) tmptable

Point to be considered is that for Oracle display a quote symbol you should have 4 single quotes.

if it's run please notify me.

Cheers
Celil
Celil

IT Governance Professional
& PPM Solution Architect
Edtroleis
Regular Collector

Re: Replacing the Value in the field

If you use oracle 10 ou later, there is a function called 'quote'. This function is use to ignore quotes in string.

use:

SELECT q'(String with quotes)'
FROM dual

Try this.
//Add this to "OnDomLoad" event