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

ksc_store : how to store the parameter and visible parameter

SOLVED
Go to solution
Highlighted
patrick-sa
Regular Collector

ksc_store : how to store the parameter and visible parameter

Hi Guys,

 

I"m looking for a way to save results of an execution step.All I want to do is to store both the parameter and visible parameter I know I can do this in the request type rules but my requirement will be best met if an execution step would accomplish this.

 

 

1. I run the query ( the field where the results will be store has a ppm - user -id validation)

 

ksc_itg_run_sql QUERY_STRING="select k.user_id from knta_users k where username ='admin'"
ksc_store REQD.P.PROC_MGR_BSS = [SQL_OUTPUT],[SQL_OUTPUT]

 

For now I can save the user id but I want both the user_id and name.

 

Thanks.

19 REPLIES
Celil
Esteemed Contributor

Re: ksc_store : how to store the parameter and visible parameter

Hi patrick,

 

Please try this;
ksc_store REQD.P.PROC_MGR_BSS = "[SQL_OUTPUT]", "[SQL_OUTPUT]"

 

PS: If the post resolves your issue, please KUDOS the professionals and mark it as Accepted Solution.

 

 

Celil

IT Governance Professional
& PPM Solution Architect
patrick-sa
Regular Collector

Re: ksc_store : how to store the parameter and visible parameter

Hi Celil

I tried your suggestion and there's no difference.Problem persists.

 

Thanks,

Patrick.

Celil
Esteemed Contributor

Re: ksc_store : how to store the parameter and visible parameter

Please try below code:

ksc_itg_run_sql QUERY_STRING="select k.user_id, k.username from knta_users k where k.username ='admin'"
ksc_store REQD.P.PROC_MGR_BSS = "[SQL_OUTPUT]", "[SQL_OUTPUT]"

 

 

PS: If the post resolves your issue, please KUDOS the professionals and mark it as Accepted Solution.

Celil

IT Governance Professional
& PPM Solution Architect
Radim79
Super Collector

Re: ksc_store : how to store the parameter and visible parameter

Try this please:


ksc_store PROC_MGR_BSS = "[SQL_OUTPUT]", "[SQL_OUTPUT]"

Jim Esler
Honored Contributor

Re: ksc_store : how to store the parameter and visible parameter

Since you want different values for the hidden and visible values, you should use something like:

 

ksc_itg_run_sql QUERY_STRING="select k.user_id from knta_users k where k.username ='admin'"
ksc_store REQD.P.PROC_MGR_BSS = "[SQL_OUTPUT]", "admin"

patrick-sa
Regular Collector

Re: ksc_store : how to store the parameter and visible parameter

Hi ,

 

This does not work because the store(field  validation is a user id) so when you try and save a user name the query fails.The ksc_store REQD.P.BEN_SDLC_BSS =  is a PPM - User id  validation and thats why you cant save a username.

 

Patrick.

Celil
Esteemed Contributor

Re: ksc_store : how to store the parameter and visible parameter

Please try below code:

ksc_itg_run_sql QUERY_STRING="select k.user_id, k.user_id from knta_users k where k.username ='admin'"
ksc_store REQD.P.PROC_MGR_BSS = "[SQL_OUTPUT]", "[SQL_OUTPUT]"
 

 

PS: If the post resolves your issue, please KUDOS the professionals and mark it as Accepted Solution.

Celil

IT Governance Professional
& PPM Solution Architect
patrick-sa
Regular Collector

Re: ksc_store : how to store the parameter and visible parameter

Hi Celil,

First a correction on my previous post.The query output is

KSC SQL Query

Source Command:Run Sql

Running query: select k.user_id ,k.full_name from knta_users k where username ='moraloju'
The following Command Step is not subject to timing out: com.kintana.core.server.execution.CLStoreCommand

KSC Store

Source Command:Run Sql

REQD.P.BEN_CPLC="101856~Judith Moralo", "101856~Judith Moralo"

The query running is

ksc_itg_run_sql QUERY_STRING="select k.user_id ,k.full_name from knta_users k where username ='moraloju'"
ksc_store REQD.P.BEN_CPLC = [SQL_OUTPUT],[SQL_OUTPUT]

patrick-sa
Regular Collector

Re: ksc_store : how to store the parameter and visible parameter

The problem with this is that the front end shows both the user_id and full name .I just cant find a way to attach a screenshot here.

I fi run your latest query,which was indeed my original query,the result is just the user id.
Celil
Esteemed Contributor

Re: ksc_store : how to store the parameter and visible parameter

in the query replace k.full_name with k.user_id. k.user_id will repated.
in command please use quotation marks.
please try this.
Celil

IT Governance Professional
& PPM Solution Architect
Celil
Esteemed Contributor

Re: ksc_store : how to store the parameter and visible parameter

If you want to see user name and store user id at the back side, firstly you must change validation of field.
Celil

IT Governance Professional
& PPM Solution Architect
Radim79
Super Collector

Re: ksc_store : how to store the parameter and visible parameter

Cecil is right, you must have validation with full_name and user_id. If you put into this field as parameter user_id, the visible paramter is automaticly set as full_name.

 

Validation example:

 

Select user_id, full_name from knta_users;

 

Command example:

 

ksc_itg_run_sql QUERY_STRING="select k.user_id from knta_users k where username ='moraloju'"
ksc_store BEN_CPLC = "[SQL_OUTPUT]"

 

Try this. On my instance this work.

patrick-sa
Regular Collector

Re: ksc_store : how to store the parameter and visible parameter

Hi Celil ,i agree with the validation part.I've given up on this one.

 

I've modified the code as shown below

 

ksc_itg_run_sql QUERY_STRING="select k.user_id from knta_users k where username ='moraloju'"
ksc_store REQD.P.SNR_CON_SPEC = "[SQL_OUTPUT]"

 

but the the query returns two values as shown in the attachement ,meaning the parameter and visible parameter is still a user id.I have attached a screenshot.

 

 

And so this does not my requirement.If i can get a way to get the command to return just one value ( the user id) i think it would work.

 

My work around is to build  a rule that reads the user id and displays the full name on page load.

 

Thanks for your assistance.

patrick-sa
Regular Collector

Re: ksc_store : how to store the parameter and visible parameter

Hi,Please see my reply below.basically on my instance the query returns two values,even if the query requests one value.
Celil
Esteemed Contributor

Re: ksc_store : how to store the parameter and visible parameter

Hi Patrick,

Please use this validation:
PPM - User Id - All

Please run this commands:
ksc_itg_run_sql QUERY_STRING="select k.user_id, k.full_name from knta_users k where k.username ='admin'"
ksc_store REQD.P.PROC_MGR_BSS = "[SQL_OUTPUT]", "[SQL_OUTPUT]"

if this not run, please screenshot error message, field settings (which you want to fill), command screen (which you try to run)
Celil

IT Governance Professional
& PPM Solution Architect
patrick-sa
Regular Collector

Re: ksc_store : how to store the parameter and visible parameter

Hi Celil,

 

The command runs but like previously stated,the user id and fullname are merged into the same field.I have attached the screenshots.

 

Regards,

Patrick.

Radim79
Super Collector

Re: ksc_store : how to store the parameter and visible parameter

HI,

this is maybe not ideal solution, but it works as you want.

 

ksc_itg_run_sql QUERY_STRING="select k.user_id from knta_users k where username ='cpas\rtolasz'"   ksc_set P_USER_ID=[SQL_OUTPUT]   ksc_itg_run_sql QUERY_STRING="select k.full_name from knta_users k where username ='cpas\rtolasz'"   ksc_set P_FULL_NAME=[SQL_OUTPUT]   ksc_store D_USER = "[P_USER_ID]","[P_FULL_NAME]"  

 

Regards

Radim79
Super Collector
Solution

Re: ksc_store : how to store the parameter and visible parameter

I'm sorry, for bad format..

 

ksc_itg_run_sql QUERY_STRING="select k.user_id from knta_users k where username ='cpas\rtolasz'"   ksc_set P_USER_ID=[SQL_OUTPUT]  

ksc_itg_run_sql QUERY_STRING="select k.full_name from knta_users k where username ='cpas\rtolasz'"   ksc_set P_FULL_NAME=[SQL_OUTPUT]  

ksc_store D_USER = "[P_USER_ID]","[P_FULL_NAME]"  

 

Rgds

patrick-sa
Regular Collector

Re: ksc_store : how to store the parameter and visible parameter

Hi Radim,

I modified your version to the one below.


1. ksc_itg_run_sql QUERY_STRING="select k.user_id from knta_users k where username ='moraloju'"
2. ksc_set TEMP_VAL_P="[SQL_OUTPUT]"
3. ksc_itg_run_sql QUERY_STRING="select k.full_name from knta_users k where username ='moraloju'"
4. ksc_set TEMP_VAL_VP="[SQL_OUTPUT]"
5. ksc_store REQD.P.SNR_CON_SPEC= "[TEMP_VAL_P]" ,"[TEMP_VAL_VP]"
//Add this to "OnDomLoad" event