pears.NetCandidateState

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

CREATE PROCEDURE "pears"."NetCandidateState"( IN "pWebUserID" CHAR(20),IN "pPersonID" CHAR(20) DEFAULT NULL ) 
RESULT( "name" CHAR(255),"currentstate" CHAR(255),"unregstate" CHAR(255) ) 
// IQXWeb
BEGIN
  SELECT "s"."name",
    "s"."status",
    "IQXNetSwitchValue"("pwebuserid",'UNREGCANDSTATE')
    FROM "status" AS "s"
      JOIN "person" AS "p" ON "s"."type" = 'P'
      AND "s"."status" = "p"."status"
    WHERE "p"."personid" = "NetCandidateValidPersonID"("pWebUserID","pPersonID")
END /* DOC
2018-10-22 MHS IW-456 multi-cand fix and tests
2019-11-05 GJ Added unreg state so this can be used in the registration wizard to determine if the candidate has registered or not.
*/
GO
 
COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetCandidateState" IS 
{CREATE PROCEDURE pears."NetCandidateState"( IN pWebUserID CHAR(20), IN pPersonID CHAR(20) DEFAULT NULL ) 
RESULT( name CHAR(255), currentstate CHAR(255), unregstate CHAR(255) )
// IQXWeb
BEGIN
  SELECT 
    s.name, 
    s.status, 
    IQXNetSwitchValue(pwebuserid,'UNREGCANDSTATE') 
  FROM 
    STATUS s 
    JOIN 
      person p ON s.type='P' 
      AND 
        s.status = p.status 
  WHERE 
    p.personid=NetCandidateValidPersonID(pWebUserID,pPersonID)
END
 
/* DOC
2018-10-22 MHS IW-456 multi-cand fix and tests
2019-11-05 GJ Added unreg state so this can be used in the registration wizard to determine if the candidate has registered or not.
*/
}
  • database/procedures/pears_netcandidatestate.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1