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

Substitude fieldvalue

SOLVED
Go to solution
Highlighted
Arno Kuijper
Occasional Advisor

Substitude fieldvalue

Hi all,

I want to automatically populate fields (when selected) fi X, Y and Z with a value from another field, fi field A.

Field A contains the value: val1;val2;val3

And i need to put:
Val1 in field X
Val2 in field Y
Val3 in field Z

How do i substitute the value from field A to be put in fields X, Y and Z.

Thanks in advance

Arno
7 REPLIES
Mahen M
Honored Contributor

Re: Substitude fieldvalue

Hi,
You can use Request Type rule to acheive this condition.

You have to use 'Advanced Defaults' Rule Type and 'Apply on field Change' Rule event.

In the Dependencies section Use 'FIELD A' with value a specific val1;val2;val3

You have to write 3 rules for
'Field X', 'Field Y', 'Field Z'.... You have to define this in the 'Results Section of the rule' In SQL you have to write Query as below.

Select REQD.P.FIELD_A, REQD.VP.FIELD_A from dual

Regards,
Mahendran M
Arno Kuijper
Occasional Advisor

Re: Substitude fieldvalue

Hi,

Yes, i use the Request Type rule.
Yes, i use the Defaults Rule Type and the Apply on field Change event.

In the Dependencies is use the Field A with the: val1;val2;val3 - value

But this is the 'standard' query
Select REQD.P.FIELD_A, REQD.VP.FIELD_A from dual, to get the Field A value :val1;val2;val3 in the Field X, Y and Z fields.

But i want:
val1 from val1;val2;val3 in field x
val2 from val1;val2;val3 in field y
val3 from val1;val2;val3 in field z

thanks
Mahen M
Honored Contributor

Re: Substitude fieldvalue

Please send me the snap of the rule, I am not clear.

Regards,
Mahendran M
Jyotir ++
Member

Re: Substitude fieldvalue

Hi ,

Please provide more information or Snapshot if possible.

Regards,
Jyotir
Erik Cole_1
Esteemed Contributor
Solution

Re: Substitude fieldvalue

Arno,

You can use a substring function in your SQL to parse the vales from field A. Something like

REGEXP_SUBSTR([YOUR_FIELD_TOKEN], '[^;]+', 1, 1)

will return the "first" value in the field (assuming ; as the delimiter).
Arno Kuijper
Occasional Advisor

Re: Substitude fieldvalue

Hi,

Erik, that did the trick.

Thanks
Arno Kuijper
Occasional Advisor

Re: Substitude fieldvalue

solved
//Add this to "OnDomLoad" event