How can I show all compounds when the If fuction returns null.

I have hidden the Manual Integration "False" and displayed X when Manually Integrated is True by using..

"   " if BoundItems["TargetPeak"].ManuallyIntegrated is False else "X"

This works great unless the peak was not found. If the peak was not found the compound does not show up in the table.

Browsing the forum similar expressions were used to display null values, for example..

"ND" if BoundItems["TargetPeak"] is None or BoundItems["TargetPeak"].IsFinalConcentrationNull() else BoundItems["TargetPeak"].FinalConcentration

Is there a way to incorporate this logic into my original expression?

Something like...

"   " if BoundItems["TargetPeak"].ManuallyIntegrated is False or BoundItems["TargetPeak"].IsManuallyIntegratedNull() else "X"

Thank you for any guidance.

Parents Reply Children
No Data
Was this helpful?