Forum Discussion
JackLacava
2 years agoHonored Contributor
A workaround in CV could be to create a third column, with its value calculated from the first two. You can do that calculation with an XFBR or with a GetDataCell custom function. I'll show the latter, because it's a bit less common and equally useful (note this code is not well-tested, I'm showing the principle). In the member expansion you'd have:
GetDataCell(BR#[BRName=MyFinanceBR, FunctionName=MyCustomCheck, FirstCriteria=CVC(Col1), SecondCriteria=CVC(Col2)]):Name(Pass Or Fail)
You'd then need a Finance Business Rule that implements that function:
' in MyFinanceBR
Case Is = FinanceFunctionType.DataCell
If args.DataCellArgs.FunctionName.XFEqualsIgnoreCase("MyCustomCheck") Then
If args.DataCellArgs.NameValuePairs("FirstCriteria") > 200000 _
And args.DataCellArgs.NameValuePairs("SecondCriteria") > 0.20 Then
Return 1
Else
Return 0
End If
End If
At that point you can have conditional formatting on the cell that works with the returned value:
If (CellAmount = 1) Then
BackgroundColor = Red
end if
Related Content
- 5 months ago