Hello All,
I am trying to use a template repeater which has a component ‘Status’ (Integer). I am using the following code to drive the ‘Status’ .
switch(
{AllProjectsSite.SiteName},
‘PoT’,
‘Broxburn’,
‘TynemouthA’,
‘TynemouthB’,
(if({AllProjectsSite.PoTBMSChldCnt}!={AllProjectsSite.PoTBMSTtlChldrnAvl},‘0’,‘1’)),
(if({AllProjectsSite.BroxburnBMSChldCnt}!={AllProjectsSite.BroxburnBMSTtlChldrnAvl},‘0’,‘1’)),
(if({AllProjectsSite.TynemouthABMSChldCnt}!={AllProjectsSite.TynemouthABMSTtlChldrnAvl},‘0’,‘1’)),
(if({AllProjectsSite.TynemouthBBMSChldCnt}!={AllProjectsSite.TynemouthBBMSTtlChldrnAvl},‘0’,‘1’)),
forceQuality(“0”,192)
Where I am trying to switch on Sitename (String).
Then I am comparing using If statement in the Switch return, to get a 0 or 1 which drives the Status bit.
Since I am switching on a string, the output (return) of the If statements wont accept 0,1 as output.(it gave me error). When I put the 0 or 1 in quotes it accepts it without any error.
But when I look at the screen , it gives me a type conversion error. See screen shot.
I assume this is the type conversion error on the screen.
And I am wondering how to sort this problem out.
Can anyone please help?