cancel
Showing results for 
Search instead for 
Did you mean: 

Personas 3.0 - Can a script determine which control triggered it?

former_member238607
Participant
0 Kudos

Hi,

I have a group of buttons that I would like to use the same script for their click event. In order to accomplish that, I need to identify which button was clicked. Is there a way to pass the GUID, or for the script to identify it, so the code can take the appropriate logic path depending on which button was clicked?

Thanks for your help!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jeff,

you can use something like this:

if (source.id === 'IDOFBUTTON1’){

     // Button 1 was pressed

}

else if (source.id === 'IDOFBUTTON2’){

     // Button 2 was pressed

}


Available Events for Scripting - SAP Imagineering - SCN Wiki


Good luck!

former_member238607
Participant
0 Kudos

Hi Merten,

Just what I needed!

By the way, I think I know the answer to this one already, but there is no way to change the Source ID for an object is there? I was a .NET developer before I moved into the SAP arena, so I'm used to a lot more control on naming, events, etc.

Thanks for your help!

Answers (0)