Skip to main content
Aug 31, 2022 12:26 AM UTC
Solved

Use BusinessRule.DashboardStringFunction XFBR string rules to extract text out of V#Annotations?

Happy Labor Day!!
How can I use BusinessRule.DashboardStringFunction, i.e. XFBR string business rules to extract text out of a datacell in cubeview that has users' text stored in V#Annotations?
We have successfully used XFBR string business rules to extract amounts from datacell in cubeview.

However, when I tried similar lines of XFBR code in my cubeview – I am not able to pull users’ text.
It is returning zero. Users are putting text into CV cell that has this combination - A#Explaination:U8#Comment:V#Annotations . Here are a few lines the don’t seem to work
1)
Dim Explain As DataCell Explain = BRApi.Finance.Data.GetDataCellUsingMemberScript(si, cube,"A#Explaination:U8#Comment:V#Annotations" ).DataCellEx.DataCell
2) I tried the next line:
Explain = BRApi.Finance.Data.GetDataCellUsingMemberScript(si,"A#Explaination:U8#Comment:V#Annotations" ).DataCellAnnotation
but I get the error message : " Does not recognize .DataCellAnnotation. 1) Error at line 71: 'DataCellAnnotation' is not a member of 'DataCellInfoUsingMemberScript'. "

ChristianW
Employee - Advisor
Aug 31, 2022 2:16 PM UTC

DataCellInfoUsingMemberScript doesn't have a DataCellAnnotation property, you need to go down one more step and select the DataCellEx property first:

BRApi.Finance.Data.GetDataCellUsingMemberScript(si,"A#Explaination:U8#Comment:V#Annotations" ).DataCellEx.DataCellAnnotation

 

And for a consistent result, you should specify the full POV to avoid problems.

3 replies

DavyAuthor
Aug 31, 2022 12:28 AM UTC

FYI - For XFBR string rules, you are limited to using BRAPI calls which means you cannot use the standard api.data.getDataCell function.

For example - If you want to use the GetDataCell function then you would have to use the GetDataCellUsingMemberScript function which acts just as the GetDataCell function does:

ChristianW
Employee - Advisor
Employee - Advisor
Aug 31, 2022 2:16 PM UTC

DataCellInfoUsingMemberScript doesn't have a DataCellAnnotation property, you need to go down one more step and select the DataCellEx property first:

BRApi.Finance.Data.GetDataCellUsingMemberScript(si,"A#Explaination:U8#Comment:V#Annotations" ).DataCellEx.DataCellAnnotation

 

And for a consistent result, you should specify the full POV to avoid problems.

DavyAuthor
Aug 31, 2022 3:32 PM UTC

 

Thanks. Based on your telling me that XFBR rules are resolved before retrieving datacells, that would mean that I would not use this code as I need to know the cell's POV before I execute :
BRApi.Finance.Data.GetDataCellUsingMemberScript(si,"A#Explaination:U8#Comment:V#Annotations" ).DataCellEx.DataCellAnnotation

As I need to pass it the cell's full POV.