Microflow to display current period

0
Hi all, I’m trying to display the current period depending on the actual month as a parameter / variable in a simple text field. E.g.: Jan = P04;  Feb = P05; Mar = P06; … I have already created an entity with the period as an object: Now I’m not sure, how to create a microflow in a way, to continuously check the current month and “calculate” the respective period. Anyone an idea how I could implement that? Or is there even a way to implement the logic as an expression in the text field? Many thanks in advance!  
asked
2 answers
0

Seems to me you do not need that entity since all you want is a visual representation of the month. Will it do to use a datefield:

answered
0

Found a solution for it:

  • Created an Entity in the Domain Model (as shown above)
  • Created a microflow with a Create Object Action:

  • Implemented following logic:
if formatDateTime([%BeginOfCurrentDay%],'MM') = '01'
then 'P04'
else

if formatDateTime([%BeginOfCurrentDay%],'MM') = '02'
then 'P05'
else

if formatDateTime([%BeginOfCurrentDay%],'MM') = '03'
then 'P06'
else

...
  • Retrieved the current Period via Data View

answered