====== pears.NetCandidateState ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Original SQL =====
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.
*/
}