UFN_FUNDINGREQUEST_STEPS
Returns the steps for a funding request
Return
Return Type |
---|
table |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@FUNDINGREQUESTID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_FUNDINGREQUEST_STEPS(@FUNDINGREQUESTID uniqueidentifier)
returns table
as return
select
ID,
FUNDINGREQUESTOUTLINESTEPID,
OBJECTIVE,
FUNDRAISERID,
FUNDINGREQUESTSTAGECODEID,
STATUSCODE,
EXPECTEDDATE,
ACTUALDATE,
INTERACTIONTYPECODEID,
CONSTITUENTID,
case
when exists (select ID from INTERACTIONADDITIONALFUNDRAISER where INTERACTIONID = INTERACTION.ID) then 1
else 0
end HASADDITIONALFUNDRAISERS,
dbo.UFN_INTERACTION_ADDITIONALFUNDRAISERS_TOITEMLISTXML(INTERACTION.ID) as ADDITIONALFUNDRAISERS,
COMMENT,
-- Output FUNDRAISERID again, this time as OWNERID. Some of the forms need
-- this as OWNERID because FUNDRAISERID is used in a form field outside of the collection
-- and so the field ID can't be reused since they are both simplelists. FUNDRAISERID can't be
-- aliased since then the value wouldn't be updated in the generated code.
FUNDRAISERID as OWNERID
from
dbo.INTERACTION
where
FUNDINGREQUESTID = @FUNDINGREQUESTID;