Forum Discussion

Manasa's avatar
Manasa
New Contributor III
2 years ago

Reading current month in XFBR

Hello,

I have a requirement where I'll have to read the current month in XFBR rule and return a string based on a few conditions. The time filter in the columns is set to |WFYear|.Base. I've tried a few different variables, but they're all only passing on the year. When I divide the columns up into specific months, I get the required results, but I'm searching for a method that I can use when that's not the case. Is there something similar to api.pov.time.name that I can use in XFBR, or is there any other approach that I'll be able to use?

Thank you,

Manasa

  • Henning's avatar
    Henning
    Valued Contributor II

    Hi Manasa, if you are using a column with a filter such as ".base", the XFBR cannot read each individual column as you noticed. Only splitting each period up into a separate column in the CV builder will work - just as you described. Not sure what it is you want to achieve exactly, but I would just create a string in the XFBR that returns each period of the selected WF year that includes your desired modifications.

    I.e. instead of using WFYear.base in the columns, you pass the WF year to the XFBR and then return a string, e.g. "2022M1, 2022M2, 2022M3" etc. And in this one you should have already worked in your modifications / conditions.

  • TheJonG's avatar
    TheJonG
    Contributor III

    Hi Manasa - you can use the 'MF' substitution variables to achieve what you are after. Simply pass |MFTime| into the XFBR rule and it will pick up each individual member in the expansion. See below screenshots:

     

     

     

    • Manasa's avatar
      Manasa
      New Contributor III

      Hi Jon - I tried using the MF variables, but the problem is that I am returning the memberfilter from the paramhelper and not the name of the rows/columns and MFTime is giving an error when used as shown below.

      is there a way to read the ColHeaderDisplayText in the rule or another way to read the current month? 

      Thank you,

      Manasa

      • ChristianW's avatar
        ChristianW
        Valued Contributor

        Hi Manasa

        Instead of using the xfbr to just return the ud8 selection for a list, you can use the xfbr function to create a comma separated list of povs.

        Instead of UD8#xfbr(ParamaHelper, GetMemberFilter, |MfTime|)

        do

        xfbr(ParamaHelper, GetMemberFilter, time=T#|WfYear|.base) to create

        T#2023M1:UD8#MemberForM1, T#2023M2:UD8#MemberForM2, …, T#2023M12:UD8#MemberForM12,