It was found that when the package was applied to a new event, some of the old titles etc were used in filenames and email subjects. These changes resolve that.

Certificate text and visibility

There are 2 properties SubTitle and Host which may be used together or exclusively. Also Subtitle needed to be renamed as Location as when only one of them are used, that is in effect the SubTitle.

  • Renamed the shared certificate text entry SubTitle to Location;
  • Added independent $ShowLocation and $ShowHost switches.
  • Updated both GenerateCertificates.ps1 and GenerateCertificatesTIME.ps1 to draw Location and Host only when their respective switches are true.

Dynamic headings, emails, and results PDF

The email subject and PDF filename were fixed. Desirable to change to reflect Hots, Location and Title dynamically.

  • In GenerateCertificates.ps1, email subjects use the shared Host text and the participant’s current section heading. If no heading is set, the configured certificate Title is used.
  • The results PDF path is now constructed after the participant CSV has been read. One unique section heading becomes the filename prefix; multiple headings use Combined-Event; if there are no headings, the configured Title is used. Invalid filename characters are removed.
  • The results PDF attached to emails uses this generated path.
  • These dynamic email-subject and results-PDF naming changes apply to GenerateCertificates.ps1. GenerateCertificatesTIME.ps1 retains its existing fixed results-PDF filename.

Verification

  • PowerShell parsing passed for the settings file and both certificate generators after the visibility changes.
  • Checked all four ShowLocation/ShowHost combinations.
  • Verified the current results.csv produces 1 HOUR TRACK WALK-Results-2026.pdf.
  • Verified the dynamic email-title expression with a section heading and its configured-Title fallback.

 TopicSubtopic
<  Prev:   Athletics Certificate Generator
   
 This Category Links 
Category:Application Dev Index:Application Dev