Constantine, who has played for a variety of clubs including Leeds United, Hereford, Northampton and Port Vale, was signed after the transfer deadline, Foyle taking advantage of the rule which permits a late signing if the player is unemployed.
Foyle had been given little time to plug the gap following the Conference-record 275,000 transfer of Richard Brodie to Crawley three minutes before the deadline.
Constantine had a hand in the first goal, scored by Peter Till in the 76th minute, and scored himself two minutes later on an impressive debut.
York had struggled to break down a determined defence as both teams found it difficult to create chances in a balanced contest.
It seemed as though York would have to settle for a point until the arrival of Constantine, who headed on a left -wing centre for Till to leave Dale Roberts helpless with a low cross-shot, and he was there at the far post to net from Alex Lawless's free-kick in the 78th minute.
York's week ended on a high after the dire display at Fleetwood on Monday being followed by Brodie's exit and then three of his players appearing in court following a city centre incident last year.
"It's been a horrendous week but it ended well as this was a very, very good team performance", said Foyle.
York City: Ingham; Parslow, McGurk, Sangare (Courteney 31), Meredith, Smith, Lawless, Barrett, Till; Gash (Constantine 63), Rankine. Unused substitutes: Knight, Young, McDermott.
Rushden & Diamonds: Roberts; Porter, Stuart, Osano, Robinson (Koranteng, 82), Johnson (O'Connor, 78), Power, Spence, Green (Jamie Day, 70), Howe, Charles. Unused substitutes: Joe Day, Keehan.
Referee: W Khatib (Sunderland).
Man of the match: David McGurk.
Click here for the latest Johnstone's Paint Trophy draw.
Welcome to the Yorkshire Post's exciting match-day service, called Match Centre. Here you will find minute-by-minute updates, stats and team formations. Plus reports from every game in England, from the Premier League down to the Blue Square Premier.
Simply select your game from the pull down menu, then click on the 'i' information button on the right of the fixture and it will give you access to everything you need to know about your team.
So if you can't make it to a game, head for the Match Centre and we will give you the best seat in the house. Click the link below.
For the latest team news, score and commentary from your team check out our new Match Centre