Hi,

I'm looking for help to make month in roman, 

I'm using this function to make cur month, but the number of month should be in roman, like Month 1,2,3, 4, 5 = I, II, III , IV, V etc.

Thanks

Hi Ayu,

You can achieve this either using static entity which will have records for each month and label set to roman latters.

Second option is to create a server or client action (base don the type of application you are using), pass your month number in this action and using switch node assign roman month latters to output variable.

To get current month use Month(CurrDate()) then use a function to map the number to the Roman letter using a switch.

Do not use a static entity for this, it ei cost you an extra Application Object.


Nikhil Gaur wrote:

Hi Ayu,

You can achieve this either using static entity which will have records for each month and label set to roman latters.

Second option is to create a server or client action (base don the type of application you are using), pass your month number in this action and using switch node assign roman month latters to output variable.

Hi Nikhil,

Thanks for reply, I already create static entity of roman. but i don't know how to implement curr month with roman static entity 

Hi Ayu,

You can get the roman label of the month by passing number using below expression

Get<StaticEntityName>(IntegerToIdentifier(1)).RomanMonths.Label

Here Get<StaticEntityName> refers to get method of your static entity

But as suggested by Daniel its better to use function instead of static entity because even if you don't have AO limit issue but using static entity will have more overhead on server then function.

Daniël Kuhlmann wrote:

To get current month use Month(CurrDate()) then use a function to map the number to the Roman letter using a switch.

Do not use a static entity for this, it ei cost you an extra Application Object.


Hi Daniel, 

Thanks for reply

What a function to map the number to the Roman letter? 


Hi Ayu,

You can achive this by using nested if in the expression,

SyntaxEditor Code Snippet

If(Month(CurrDate())=1,"I",
   If(Month(CurrDate())=2,"II",
    If(Month(CurrDate())=3,"III",
           ...........)))) and so on..

Hope this helps

Regards

Seema

Hi,

I agree with Daniel that first, you need to collect the month then you have to use the switch case to get the specific Roman No from the static entity. and display the roman no instead of the 1,2,3.

I hope this will help you to overcome the issues.


Thank you,

Sudip

Ayu Andini wrote:

Daniël Kuhlmann wrote:

To get current month use Month(CurrDate()) then use a function to map the number to the Roman letter using a switch.

Do not use a static entity for this, it ei cost you an extra Application Object.


Hi Daniel, 

Thanks for reply

What a function to map the number to the Roman letter? 


Hi Ayu,

There is no inbuild function to map number to roman letter. You have to create it your self. Just create a function with number as input parameter and add a switch node to assign respactive roman letter based on input number.


Seema Pandey wrote:

Hi Ayu,

You can achive this by using nested if in the expression,

SyntaxEditor Code Snippet

If(Month(CurrDate())=1,"I",
   If(Month(CurrDate())=2,"II",
    If(Month(CurrDate())=3,"III",
           ...........)))) and so on..

Hope this helps

Regards

Seema

Hi Seema,

there is an error.


Solution

Ayu Andini wrote:

Seema Pandey wrote:

Hi Ayu,

You can achive this by using nested if in the expression,

SyntaxEditor Code Snippet

If(Month(CurrDate())=1,"I",
   If(Month(CurrDate())=2,"II",
    If(Month(CurrDate())=3,"III",
           ...........)))) and so on..

Hope this helps

Regards

Seema

Hi Seema,

there is an error.


You have to set false value, use this for XI


  If(Month(CurrDate())=11,"XI",XII,)

SyntaxEditor Code Snippet

If(Month(CurrDate())=1,"I",
   If(Month(CurrDate())=2,"II",
    If(Month(CurrDate())=3,"III",
       If(Month(CurrDate())=4,"IV",
          If(Month(CurrDate())=5,"V",
             If(Month(CurrDate())=6,"VI",
               If(Month(CurrDate())=7,"VII",
                  If(Month(CurrDate())=8,"VIII",
                      If(Month(CurrDate())=9,"IX",
                         If(Month(CurrDate())=10,"X",
                           If(Month(CurrDate())=11,"XI", "XII"))))))))))) 
Solution

Attached a working example using a Switch

Hello

I would like to add to the discussion on a specific point. 

Depending on the context where this information is required, having a Static Entity that you can Join and find the Roman number for the month without having to call an action later or, even worse, loop through a list, may be worth even if it consumes an AO. 

And for new license model, if I am not mistaken, the AO concept no longer exists... (but I am not entirely sure here) 

Cheers

Eduardo Jauch wrote:

Hello

I would like to add to the discussion on a specific point. 

Depending on the context where this information is required, having a Static Entity that you can Join and find the Roman number for the month without having to call an action later or, even worse, loop through a list, may be worth even if it consumes an AO. 

And for new license model, if I am not mistaken, the AO concept no longer exists... (but I am not entirely sure here) 

Cheers

Hi Eduardo,

Yes, I also got some information about new licensing model that AO concept is no longer applicable and it was supposed to be applicable from Jan 2020. But didn't find it anywhere in written so didnt mentioned it.


I think this was talked directly to the customers in a presentation (I know of a company that was present).

Will the new licensing model be applied to existing customers too? Or only new?

For Support this is not the case, there are support SLA voor <= 2019 and then new once for 2020 as far as I know.

Anybody can share information?

Eduardo Jauch wrote:

Hello

I would like to add to the discussion on a specific point. 

Depending on the context where this information is required, having a Static Entity that you can Join and find the Roman number for the month without having to call an action later or, even worse, loop through a list, may be worth even if it consumes an AO. 

And for new license model, if I am not mistaken, the AO concept no longer exists... (but I am not entirely sure here) 

Cheers

Yes, if AO's are not an issue I would 100% use a static entity too.


As another option, you could just use something like this:

TrimEnd(Substr("I   II  III IV  V   VI  VII VIIIIX  X   XI  XII ", (Month(date) - 1) * 4, 4))

or if you really want something obscure nobody will understand:

If(Mod(m + 1, 5) = 0, "I", "") + If(m < 4, "", If(m < 9, "V", "X")) + If(Mod(Mod(m, 5),4) > 0, FormatText("", Mod(m, 5), 3, True, "I"), "")

(No, just kidding, don't use that, they'll fire you :).)