Forum Discussion

MarkusWipp's avatar
MarkusWipp
Contributor
2 years ago

Using XFBR in CubeView for Cell Format

Hi all, 

I'm looking for a possibility to dynamically create a Cell Format via an XFBR Rule. Unfortunately it doesn't seem to work, but also does not give an error message. Could someone please let me know, whether and how it is possible?

The script is e.g. returning something like "|!MyFormatParameter!|" in the easiest case.

 

Thanks in advance

Markus

  • Hi Markus: you can definitely use XFBR strings in the cell format.  Try a super basic format to ensure you have syntax, spelling, etc. correct (something like TextColor = Red).  Also, XFBR's in the conditional portion of cell formatting get picky.  If that is where things aren't working, we'll need a bit more detail on what you are trying to accomplish.

    Just for reference, here are a few ways to do parameterized formatting:

    • Use parameters as options for the cell format.  Example:   Scale = |!Select_Scale!|   (which can be a delimited list or other param)
    • Use a literal value parameter with nested parameters of options.  Example: |!DefaultFormatting!| is a literal string of formatting options.  It can include additional parameters within it that will be evaluated, like the scale option above.
    • Use XFBR as options for the cell format. Same concept as the select scale but with the right-hand side as an XFBR string rather than parameter.
    • Use XFBR which returns a literal string of the formatting options.

3 Replies

  • Hi Markus: you can definitely use XFBR strings in the cell format.  Try a super basic format to ensure you have syntax, spelling, etc. correct (something like TextColor = Red).  Also, XFBR's in the conditional portion of cell formatting get picky.  If that is where things aren't working, we'll need a bit more detail on what you are trying to accomplish.

    Just for reference, here are a few ways to do parameterized formatting:

    • Use parameters as options for the cell format.  Example:   Scale = |!Select_Scale!|   (which can be a delimited list or other param)
    • Use a literal value parameter with nested parameters of options.  Example: |!DefaultFormatting!| is a literal string of formatting options.  It can include additional parameters within it that will be evaluated, like the scale option above.
    • Use XFBR as options for the cell format. Same concept as the select scale but with the right-hand side as an XFBR string rather than parameter.
    • Use XFBR which returns a literal string of the formatting options.
  • Hi db_pdx, hi ckattookaran, 

    first of all thanks for your answers. I spend the last days with trying to understand, why it was not working in my case and also tried what db_pdx suggested. The outcome is now, that I converted all of the parameters that I had into one big XFBR, that I use for applying our standard format to our cube views.

    The pro of it that I now instead of having literally dozens of parameters, I just have one XFBR, which concentrates all the logic in one place, which I think makes it easier to maintain.

     

    Thanks

    Markus