Skip to Content

Personas 3.0 - Switch Flavor


We just upgraded from Personas 2.0 to 3.0

We were able to use the Switch flavor functionality using the Parameter. I am not sure how to achieve this in 3.0

I found a link suggested by Tamas but not able to understand how to use it

Scripting Utility Methods - SAP Imagineering - SCN Wiki

My Scenario

In VA43 (Contract Display)

1. Overview screen has 3 Items

2. Double click on Item 10 -> Should switch the flavor to a new one where there is a tab with Billing Plan

3. Double click on other Items -> Should switch the flavor to a new one where there is no Billing Plan tab

These items can be created in any sequence.

Any help is appreciated.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Aug 22, 2016 at 04:52 PM

    Hi Salil,

    You will need to create two flavors:

    1. FlavorA(flavor with Billing Plan)

    2. FlavorB (flavor without Billing Plan)

    In FlavorA, create a script with the following contents and assign it to the OnLoad screen event:

    // Put code here to check if the billing plan exists - one way to do this is to check the text of the tab page control since the IDs are index based.

    if(<condition fails>){

    // Switch to FlavorB only if there is no billing plan tab using the following. The GUID can be seen in the deep link (click on chain link button on the flavor manager)

    session.utils.changeFlavor(<GUID of FlavorB>);


    In FlavorB, on the overview screen, create an OnLoad script with the following contents:

    session.utils.changeFlavor(<GUID of FlavorA>);

    If you need to troubleshoot and want to change the script in FlavorB overview screen, you can use the suppressOnLoadEvents=X URL parameter. This will deactivate the execution of OnLoad scripts.

    Best regards


    SAP Screen Personas Team

    Add a comment
    10|10000 characters needed characters exceeded

    • Salil, you will need to change your script to the following:

      var tab_text = session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP*/tabpT\\06").text;

      if(tab_text !== "Billing plan"){

      session.utils.changeFlavor ("0050569040F81EE69A8DA25D94091A59");


      If there are any errors, kindly open the developer tools console and include the contents of the error.

      Best regards


      SAP Screen Personas Team

      Message was edited by: Kranthi Kumar Muppala Changed the condition so, the switch happens if the tab's text is not 'Billing plan'. Change it to your requirement if different.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.