From wiki.ginstr.com
Jump to: navigation, search
available from 2.5.10

gn:act_getHolidaysFor

Description
Action that gets generic or company holidays for specific date. If two holidays exist for same date Company and generic ginstr then only company holiday will be returned. Each holiday belongs to certain country and optionally a region. During action use the country and the region are taken from currently logged in user into the application. Returned holidays are stored into rows targets.
Action returns
void

Action signatures

[gn:act_getHolidaysFor]|[target, sourceDateOrDateTime]
Parameter Description
target target target to which returned holidays are saved
sourceDateOrDateTime source where timestamp of the day is stored that will be checked for holidays

Output rows structure, by columns:

  • "id" text - id of the holiday record
  • "holiday_country" text - id of the country to which holiday belongs
  • "holiday_region" text - id of the region to which holiday belongs
  • "holiday_status" text - status of holiday (official, unofficial, ...)
  • "holiday_pay_factor" number - factor of pay for holiday

Example

variables.xml
<variable id="foundHolidays" type="rows"/>
<variable id="holidayDate" type="date">1578268800000</variable>
strings.xml
<string name="formatNumber">#</string>
screen.xml
<FrameLayout
    android:id="@+id/exampleFrame"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:visibility="gone"
    gn:act_set="[gn:act_getHolidaysFor]|[@variable/foundHolidays,@variable/holidayDate]" />
after action execution
@variable/foundGenericHolidays = will contain a holiday if currently logged user by country and region has company or generic holiday that day