When discussing player profiles, is it possible to dynamically change the player's picture based on the selected filter? Can this dynamic picture feature also be applied to other scenarios, such as club and team logos?
It is possible to dynamically change the player's picture, team logo, and club logo based on the selected filter options using scripting functions in SAP Analytics Cloud.
The following video provides a comprehensive answer to your question.
Note
Please insert this script on the page (at onInitialization) and on the table (at onResultChanged).
Code Snippet
123456789101112131415161718192021
Table_2.setVisible(false);
var len = Table_2.getDataSource().getDataSelections().length;
var person_id = Table_2.getDataSource().getDataSelections()[0]["PERSON_ID"];
var url_image = 'https://sap-sports-one-demoxs05-jtp08957.eu10.sportsone.cloud.sap/sap/sports/fnd/db/services/public/xs/pictures/person?PERSON_ID=' + person_id;
if (len > 1) {
Image_3.setVisible(false);
} else {
Image_3.setVisible(true);
Image_3.setImage(url_image);
}