cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Personalization Variable(s) at Runtime

Former Member
0 Kudos

Is there a way in the PDK for .NET to add personalization variables at runtime? In JAVA you can use PCD_PERSONALIZATION_PRINCIPAL to add a personalization variable, but I have not seen a way to do this in the PDK for .NET yet.

I want to be able to add a new personlization variable on the fly as needed and have it stored in the PCD for that user.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

The PDK for .NET does not support adding personalization variables at runtime.

What you could do is to add a generic variable at design time that will hold all the info, that is to change it's value according to the variables you would like to add and parse it accordingly.

Regards,

Tsachi

Former Member
0 Kudos

Tsachi,

Thanks, that is an excellent idea. However, there are other possibilities that I wanted to explore. Perhaps, modifying the portalapp.xml during runtime may be another possibility? So far I haven't had any success with this and was wondering if anyone ever thought of it and tried it.

Basically, our scenario is the following:

1. User selects a preferences iView.

2. iView grabs preference variables and values stored in a database.

3. iView simultaneously gets list of preference variables and values stored in PCD.

4. iView compares them. <b>If database yields preference variables and values that are not in the iView's personalization list then it adds them</b>.

What I've bolded is the tricky part. Unless anyone else has any elegant ideas involving manipulation of the portalapp.xml at runtime, then your answer appears to be the best solution. Thanks! --Shibli

Former Member
0 Kudos

Hi Shibli,

The personalization variable are stored in the PCD on deployment time of the par. So manipulating the portalapp.xml file (I guess you meant on the .NET side) will <b>not</b> solve the problem.

Anyway I suggest you try asking in the portal forum if this is possible but since you are developing with the PDK for .NET I don't see how this could be done in runtime.

I am pretty sure that doing this the way I suggested would save you time since it is easy to implement & you do know how to do this. Basically the values would still be stored in the PCD and this is the important thing.

If you need further help on this or you find out how to add variables in runtime, you are more then welcome to post the info here.

Regards,

Tsachi

Former Member
0 Kudos

Thanks so much for your feedback, Tsachi. I think the solution you described is the best bet. I'm going to try it out and see what I can come up with.

If anyone else has any other suggestions I'd be most interested...though I think for now Tsachi's suggestion is best. Thanks! --Shibli

Former Member
0 Kudos

Hi,

I gave this thing another thought and came up with an idea.

What you can do (I think) is to write a portal service (in java of course) that reads & writes personalization variable of iViews to and from the PCD and then wrap this service with a web service. After that all the rest is smooth sail - just consume this web service from a .net portal component.

This would do exactly what you've ask but would requires more investigating (the portal forum would be a good place to start asking), work and coding java.

Regards,

Tsachi

Former Member
0 Kudos

Tsachi this is indeed a very good lead to follow. Thanks for the tip! --Shibli

Answers (0)