Navigation:  Macros > Macro Language > Built-in Functions > All Functions (Alphabetical) >


Previous pageReturn to chapter overviewNext page

str = GetHolNameFromTable()


This macro function returns the name in rich text format (RTF) of the current holiday in the holidays table.


// initialize the holidays table


// check if there is a holiday today

if FindNextHolidayOnDate(Today(), nHolSet)

 sName = GetHolNameFromTable()

 sRESULT = 'The formatted holiday name is "' + sName + '"'



This function returns formatted text which includes format markers. An example of such text is :


Daylight Saving Time **RICH**begins**TEXT** on **RICH**02 april **TEXT**at 2 am.


These markers ensure that if you can include the result of this function into a string variable, such as sRESULT, and get correcrtly formatted text as the output of your macro.


Daylight Saving Time begins on 02 april at 2 am.


However, if you only need to get the plain text part of a holiday name, for example to see if it contains some given text, you should use the GetHolTextFromTable function instead.


Note :

The 4 functions GetHolDateFromTable, GetHolIdFromTable, GetHolTextFromTable, and GetHolNameFromTable are used to read information about the current holiday record in the holidays table. If you need to get the value of a holidays list token, you should use the EvalToken function.

To set the current record to a desired holiday occurrence you would use one of the functions such as : FindNextHolidayOnDate or GetDateForHolidayIdOfYear.


This function is part of a set of advanced functions that give you direct access to the holidays tables (see Using Built-in Holidays Functions).

Topic 105137 updated on 29-Sep-2017.
Topic URL: