Jump to content
Sign in to follow this  
mackerelhead

Calc to conditionally display image in container

Recommended Posts

In a portal, I want to have an icon display only if there's a related record for that portal row. (i.e. the last row won't have an icon)

I set up a global container field with the icon in it ("iconfield"). This is in the relation that shows in the portal.

I set up a calculation field that tests for the primary key of the relation:

If ( IsEmpty ( kp_key );""; iconfield )

This is also in the relation that shows in the portal.

I know the logic is right, because this works as expected:

If (IsEmpty(kp_key);"empty";"full")

I know the icon is there, because if I simply put the iconfield in the layout, it shows up.

But using my calculation, where the icon should be, I get 0 (zero) which seems to me to say that the calculation is getting a "false" result. So I'm handling the container wrong.

Any help?

Share this post


Link to post
Share on other sites

Is the result of your calculation field set to type Container?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    twelvetens 
×

Important Information

By using this site, you agree to our Terms of Use.