This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error casting riskindex on web portal

Hi all,

I'm trying on the web portal to show label "High" or label "Low" if riskindex  is 1 or 0 (I set only this 2 values).

The value is a double on the db as I can see.

To do so iI use in "Expression for display value" the follow expression:

if(singleproperty("UNSGroupB", "RiskIndex", format("UID_AccProduct = {0} ", sqlformatvalue(UID_AccProduct, "string", "NonUnicodeLiterals")))=1) then "High" else "Low"

 

But I get the follow error:

"Unable to cast object of type 'VI.WebRuntime.VI_StandardWeb.VI_ObjectView_Default' to type 'VI.WebRuntime.VI_StandardWeb.IVI_ObjectView_Default'.

(2018-02-07 11:16:33)

What I'm doing wrong?

 

How can I solve it?

 

Another strange things is that in the dev environment it works but in test no.

 

Thanks

Mik

 

on v7.1

Parents
  • Hi Mik,

    I would add a property to the collection UNSGroupB, with the following Rule:
    if(RiskIndex = 0) then "Low"
    else "High"
    On the Grid column you can set the visibility only for a specific AccProduct.

    I would not use singleproperty as it can make things slow, unless it is really needed or only used for a couple data entries.
    Instead of the format you could use SQLCompareUID.

    Regards,
    Geraldine
Reply
  • Hi Mik,

    I would add a property to the collection UNSGroupB, with the following Rule:
    if(RiskIndex = 0) then "Low"
    else "High"
    On the Grid column you can set the visibility only for a specific AccProduct.

    I would not use singleproperty as it can make things slow, unless it is really needed or only used for a couple data entries.
    Instead of the format you could use SQLCompareUID.

    Regards,
    Geraldine
Children
No Data