Reading current month in XFBR

Manasa
New Contributor III

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

5 REPLIES 5

Henning
Valued Contributor

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
New 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:

 

TheJonG_0-1672324375419.png

TheJonG_1-1672324389321.png

TheJonG_2-1672324418407.png

 

 

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.

Manasa_0-1672327807232.png

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

Thank you,

Manasa

TheJonG
New Contributor III

In this case, you are correct, the MF Variables would not work. There is no way to reference the columns dimensions in a member expansion from the rows. I don't think there is any way to achieve what you are after aside from creating the individual columns

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,