Author Topic: Liquid UI - "fieldsize" command  (Read 7131 times)

Benjamin Dasari

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 96
    • View Profile
Liquid UI - "fieldsize" command
« on: August 25, 2017, 03:36:23 PM »
Purpose:
The fieldsize command restricts character entry on native SAP and Liquid UI fields.
The fieldsize command works both on native SAP fields and on user-created fields.
It is restricted to standard SAP editable fields.

The syntax is as follows:
   fieldsize("F[fieldName]", n);
   
NOTE: The fieldsize command cannot be used to increase a field's size to be greater than the original size - it can only make a field smaller.

Options:
The fieldsize command takes the one option called "scrollable".
The scrollable option specifies if the resized field will or will not be scrollable by the user. What this means in practice is that if the field is originally 20 characters and the user specifies that the new fieldsize will be only 10, applying the scrollable options enables the user to enter up to the original twenty characters.

The syntax is as follows:
       {"scrollable":true}

Liquid UI Code:
----------------------------------------------------------------------------------------------------------------------------------------------
Script File Name: SAPMV45A.E0102.sjs    // VA02 transaction
----------------------------------------------------------------------------------------------------------------------------------------------
fieldsize("F[Order]",5);                               // To reduce the length of the field to size 5
fieldsize("F[Order]",5, {"scrollable":true});  // To reduce the length of the field to size 5, however user can enter upto the original length of the field


See attachments for code samples!
« Last Edit: September 19, 2017, 02:53:12 PM by Benjamin Dasari »