08-30-2022 08:26 PM - last edited on 05-25-2023 06:10 AM by JackLacava
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'. "
Solved! Go to Solution.
08-31-2022 10:16 AM - edited 08-31-2022 10:17 AM
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.
08-30-2022 08:28 PM
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:
08-31-2022 10:16 AM - edited 08-31-2022 10:17 AM
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.
08-31-2022 11:32 AM
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.