NextGen Knowledge Center

Common Script Functions

You can use common script functions for generating Trigger Script and Run Command for templates.

The following script functions support Trigger Functions and Run Command.
FunctionSyntaxDescription
FIELDCOLORFIELDCOLOR( «textcolor», «backcolor», «fieldname(s,)» )Changes field color.
GETCELLTEXTGETCELLTEXT( «grid», «row», «col» )Returns cell text for cell at row and column.
GETCOLINDEXGETCOLINDEX( «grid», «column_name» )Returns index of column index number, helpful for formatting cell data.
GETROWHEIGHTGETROWHEIGHT( «grid», «row» )Gets the height of row on grid.
ITEMDATAITEMDATA( «field», «idx» )Get item data from new item data field on check box, radio button, and others. Item data is ; separated and 1 index based.. 0 index returns.
LAUNCHDOCLAUNCHDOC( «document» , «print» , «offline»"));Opens document from provided document name.
LAUNCHIMAGELAUNCHIMAGE( «image» )Opens image from provided image name.
LAUNCHTEMPLAUNCHTEMP( «template» )Opens template.
PATEDUCATIONPATEDUCATION( «patedfilename», «language», «age», «source» )Opens patient education document from provided document name and settings.
REDRAWREDRAW( «grid» , «true/false» )Turn off and on grid paint routines while setting cell contents.
OFFSETOFFSET( «startx», «starty», «offsetx», «offsety», «field_name\groups(s,)» )Move fields.
POSXPOSX( «posx_ofpanels» )Sets the starting left position of the panels on the window.
RESIZERESIZE( «width», «height», «field_name\groups(s,)» )Resizes field.
ROWLIMITROWLIMIT( «limits» , «grid» )Sets the row limit for # of rows to show on Auto Grow Panel.
RUNCOMMANDRUNCOMMAND( «command or context»,«show as menu»)Run command or run command menu.
SETCELLBOLDSETCELLBOLD( «true», «row», «col» )Sets bold for cell using provided row and column number.
SETCELLFONTSETCELLFONT( «fontname», «row», «col» )Sets font for cell using provided row and column number.
SETCELLIMAGESETCELLIMAGE( «image.ico», «row», «col» )Sets image on cell using provided row and column number.
SETCELLITALICSETCELLITALIC( «true», «row», «col» )Sets italic for cell using provided row and column number.
SETCELLSTRIKETHRUSETCELLSTRIKETHRU( «true», «row», «col» )Sets strike through cell using provided row and column number.
SETCELLTEXTCOLORSETCELLTEXTCOLOR( «color», «row», «col» )Sets cell text color using provided row and column number.
SETFILTERSETFILTER( «grid», «filter» )}Sets filter on specified grid.
SETRANGESETRANGE( «min» , «max», «fields» )Sets range.
SETRANGEMSGSETRANGEMSG( «msg» , «fields» )SETRANGEMSG( «msg» , «fields» )
SETBACKCOLORSETBACKCOLOR( BackColor:«r,g,b,» )Sets color of template.
SETBACKIMAGESETBACKIMAGE( Image:«image_name» )Sets back ground image of template.
SETCAPTIONSETCAPTION( «caption», «field_name(s,)» )Sets caption on button, label, check box, radio buttons.
SETFONTSETFONT( «font_name», «font_size», «isbold», «field_name(s,)»)Sets the font for fields on the template.
SETGRIDCOLORSETGRIDCOLOR( TextColor:«text_color», BackColor:«back_color», AltColor:«alt_row_color», «grid_name(s,)»)Sets the text, background and alternate row color on grid controls.
SETITEMDATASETITEMDATA( «data», «field_name(s,)» )Sets the item data related on a field for possible context changes at design time.
SETMYPHRASESETMYPHRASE( «phrasetype», «field_name(s,)» )Sets context phrase type on fields using my phrases or turn off the phrase for that field.
SETTOOLTIPSETTOOLTIP( «field_name», «title», «body» )Sets the tooltip on a control.
SHIFTFIELDSSHIFTFIELDS( «direction, «pixels», «fields(s)/#groups» )Moves fields up, down, left, or right by number of pixels.
Common Script Functions