Entries by Konstantinos

, ,

Using the SetCellColor method

SetCellColor is used to dynamically change the cell color of a control using scripting. To call the method: Code form.GetControl(“ControlName”).SetCellColor(“ColorCode“);   where ControlName is the name of the control whose cell color you want to change and ColorCode is the HTML color’s code representation.   For example, let’s assume we have a TextBox control called c_Country and a Button control, c_Control4 with an […]

, ,

Using the ParentListName method

A new method called ParentListName was added in the latest version of PowerForms HTML. This method can be called from a form used inside a ListAndForm control and will return the list name of the form containing the actual ListAndForm control.   In order to call the new method, use: Code form.ParentListName();   The method is best used when […]

, ,

Enable, Disable, Select Tab on Form using scripting

You can now programmatically Enable, Disable and Select a tab on the form. The generic syntax is:   Code form.EnableTab(integer); form.DisableTab(integer); form.SelectTab(integer);   where interger represents the tab’s ordering spot on the form, starting with 0 for the first tab.   For example, to select and display the contents of the second tab on the form: Code form.SelectTab(1); […]

, ,

Handling the BusyChanged event for controls

Each control exposes a “BusyChanged” event which is raised when the controls starts loading data (for example for comboboxes, radiobuttons, checkboxes) and when loading completes. The event provides a boolean parameter indicating if the loading starts or completes. Example : Code form.GetControl(“c_CascadingRadio”).BusyChanged.AddHandler(function(busy) { var c = form.GetControl(“c_LoadingIndicator”); if (busy) c.SetValue(“Loading…”); else c.SetValue(“Completed”); });

, ,

Handling the AttachmentsLoaded event

The “form” object available from script, exposes a specific event that is raised after the item attachments are loaded. The event is called “AttachmentsLoaded” and provide a list of the available item attachments. For each attachment, the “Filename” and “FullPath” properties provide access to file attributes. Example: For the following example, we will handle the […]

, ,

Define Hierarchical Comboboxes

In common scenarios, there are linked lists that need to be included as hierarchical comboboxes in your forms. For example a typical Country/City scenario would include 2 lists. –  Countries (ID, Title) –  Cities (ID, Title, Country) where the Country field is a lookup for the Country List. In order to declare the comboboxes for […]

, ,

Declaring a Lookup/Combobox Control

Available options: Choice Control (Single Selection) Declare a new ComboBox or LookupPicker control. Set the Target Field Name and in the Lookup Details tab, set the Lookup Static Values property adding all the required values concatenated by semicolon (;). For example for a rating field : Low;Medium;High During initial form customization, the form designer identifies […]