Prerequisites
- Products: Liquid UI WS, Liquid UI Server or Local DLL, Client Software
- Commands: del(), pushbutton(), getfieldattribute()
Purpose
This article demonstrates how to use the getfieldattribute command to display properties of the push button, including icon ID, tooltip, and label name. The following steps will guide you through the process.
- Delete the image container on the SAP Easy Access screen
- Add a push button to retrieve its attributes
- Add a function to showcase the attributes of a created push button.
User Interface
//Create this file inside your script folder for customizing the SAP Easy Access screen, SAPLSMTR_NAVIGATION.E0100.sjs
//Now, let's add the Liquid UI script to the above file and save it.
Customization
- Delete the image container on the SAP Easy Access screen using del().
// Deletes the image container del("X[IMAGE_CONTAINER]");
- Add a push button with an icon and label it as Pushbutton attributes.
// Creates a pushbutton with an icon, tooltip and label pushbutton([5,25], "@01\\QHELLO@Pushbutton attributes",{"process":printbutton});
- Add a printbutton function to retrieve and display attributes of the created push button on the console window.
// Function to retrieve the push button attributes using getfieldattribute function printbutton(buttonName) { getfieldattribute("P[Pushbutton attributes]", {"name.icon":"fbuttonicon","name.tip":"fbuttontip", "name.label":"fbuttontext"}); println("\t fbuttonicon = " + fbuttonicon); println("\t fbuttontip = " + fbuttontip); println("\t fbuttontext = " + fbuttontext); }
SAP Process
- Refresh the SAP Easy Access screen and click Pushbutton attributes. This displays the attributes of the push button on the console window, as shown below.
Next Steps
Get attributes of an inputfield
Learn how to obtain attributes of an inputfield.
Learn how to obtain attributes of an inputfield.
10 min.
This article is part of the Invoking functions tutorial.
Display custom pop-up
Learn how to customize the pop-up screen as per your requirement.
Learn how to customize the pop-up screen as per your requirement.
10 min.
This article is also a part of the Interpreting function codes tutorial.