You probably know how to add a button or link to clear the value of an item. You may have seen the button on apex.world when you search for a plug-in, for example.
You can use a Dynamic Action that executes a “Set Value” or a fairly straight-forward code like this:
<a href="javascript:$s("P1_SEARCH", "")">Clear</a>
What I like to do is define APEX Shortcuts. You find them under Shared Components > Other Components > Shortcuts
There are two Shortcuts I usually create and use them depending on how well they fit:
- A button CLEAR_BUTTON
- A text link CLEAR_LINK
Once these Shortcuts are defined I can simply type "CLEAR_BUTTON" or "CLEAR_LINK" in the “Post Text” field of an Item.
return '<a class="a-Button a-Button--popupLOV lov-clear" aria-label="' || apex_lang.lang('Clear') || '" title="' || apex_lang.lang('Clear') || q'!" href="javascript:$s('#CURRENT_ITEM_NAME#','');">!'
|| '<span class="fa fa-close"></span>'
|| '</a>';
return q'!<a href="javascript:$s('#CURRENT_ITEM_NAME#','');" class="clearLink a-Button a-Button--popupLOV">!'
|| apex_lang.lang('Clear') || '</a>';
Final Note: I may be using APEX 20.1 for the screenshots, however, I’ve been using this feature since APEX 4.2!!!
Post a Comment
0Comments