Let's follow up this discussion at the Neptune Community

(this forum will be kept in read-only mode)
Solved

Problems with tile-refresh (API_TILE_INFO)

Hi!


I did my first steps with the dynamic info on a menu entry tile. I used the Method API_TILE_INFO to set a number on a tile and it works. But if I want to remove that number by calling API_TILE_INFO( number = '' ) it does not remove the number. Setting it to '0' Shows a Zero.

How can I completely remove the shown number if it is Zero?


It is handled correctly when I completely reopen the launchpad after Setting it to '' or '0'. It would be nice if this would work with the dynamic updates, too.


Another important issue regarding tile-updates: there should be a check against the values supplied. If I for example put '-' into the NUMBER-Parameter or if I put a random string into INDICATOR, the launchpad crashes and stops working after providing the authentification. I can see in the console, that SAPUI5 does not accept certain values in the tile-properties. So maybe you could check the provided values within API_TILE_INFO regarding consistancy. Otherwise I Need to remove all Cookies(!) from launchpad and neptune in order to get out of that false state. Took me a while to find out that the info is put into a Cookie and not into the browser Cache.


Thank you!


Kind regards,


Tim Parth


Hi Tim


We have added a validation check inside the API_TILE_INFO and will be delivered with 4.0 SP01. When you now send 0 in the NUMBER the tile will show 0. When you send space, the NUMBER will not be displayed. So you now have the option to decide the behavior.


Thank you for the feedback and suggestion. 


PS: To clear if something is wrong using our Launchpad, use: AppCache.RemoveAllCache();


Regards

Ole Andre 

Hi Tim 


This will be a new javascript helper for updating the Tile Information from Javascript in 4.0 SP01. But should also work in 4.0 (Not Delta/RadialChart).


 

// Common
if (sap.n) {
    var rec = {};
    rec.APPLID = localAppID;
    rec.TILE_FOOTER = "My Footer";
    rec.TILE_UNIT = "My Unit";
    rec.TILE_TITLE = "My Title";
    rec.TILE_INFO = "My Subheader";

    // Data for your tiletype, see below and copy/paste your tiletype

    sap.n.Launchpad.UpdateTileInfo(rec);

}

// // NumericContent
// rec.TILE_NUMBER = 1;
// rec.TILE_ICON = "sap_icon://home"; // Icon
// rec.TILE_INDICATOR = "None"; // Down | Up | None
// rec.TILE_VALUECOLOR = "Neutral"; // Critical | Error | Good | Neutral


// // NewsContent
// rec.TILE_CONTENT = "My News Content"; // ContentText


// // DeltaMicroChart
// rec.TILE_VALUE1 = 1; // Value1 & DisplayValue1
// rec.TILE_VALUE2 = 1; // Value2 & DisplayValue2
// rec.TILE_VALUE3 = 1; // DeltaDisplayValue
// rec.TILE_TITLE1 = "My Title"; // Title 1
// rec.TILE_TITLE2 = "My Title"; // Title 2
// rec.TILE_COLOR1 = "Neutral"; // Critical | Error | Good | Neutral


// // RadialMicroChart
// rec.TILE_VALUE1 = 1; // Percentage
// rec.TILE_COLOR1 = "Neutral"; // Critical | Error | Good | Neutral
// rec.TILE_VALUE2 = 1; // Fraction
// rec.TILE_VALUE3 = 1; // Total


// // ColumnMicroChart & ComparisonChart
// rec.TILE_VALUE1 = 1;
// rec.TILE_COLOR1 = "Neutral"; // Critical | Error | Good | Neutral
// rec.TILE_TITLE1 = "My Title";

// rec.TILE_VALUE2 = 1;
// rec.TILE_COLOR2 = "Neutral"; // Critical | Error | Good | Neutral
// rec.TILE_TITLE2 = "My Title";

// rec.TILE_VALUE3 = 1;
// rec.TILE_COLOR3 = "Neutral"; // Critical | Error | Good | Neutral
// rec.TILE_TITLE3 = "My Title";

 


Regards

Ole Andre 

Hi!,


Thank you very much! I'll try this once I get back to that system. Is there any release date for SP01 already?


Kind regards,


Tim Parth

You are welcome, Tim.  SP01 will be released on June 24th.

Login or Signup to post a comment