We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Flat Form month out or order

Answered
Vanessa Aguiar asked on May 25, 2022

Hello, i'm using the flat form to see my data but the month is out or order, as you can see in the annex, how fixed that.

Attachments:
Screenshot_6.png

7 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster May 26, 2022

Hello, Vanessa!
 
Thank you for contacting us.
 
We kindly suggest explicitly setting the datatype of the "month" field to number. You can use the mapping property of the dataSource object for such purposes:

report: {
dataSource: {
...
mapping: {
"month": {
type: "number"
}
},
},
...
}

You can find more details about mapping in our docs: https://www.flexmonster.com/doc/mapping/.
 
Please note that Flexmonster supports several input formats for date datatype and can split the date into separate fields if needed.
Check out our example for reference: https://jsfiddle.net/flexmonster/nj9cfhzL/.
For more information about the date and time formatting in Flexmonster, look through the documentation: https://www.flexmonster.com/doc/date-and-time-formatting/.
 
We hope it helps. Feel free to ask if any further questions arise.
 
Regards,
Solomiia

Public
Vanessa Aguiar May 30, 2022

Hello, the solution works on the others layouts, like the print in the annex, but on the Flat Form he puts two zeros after the comma, print in annex.

How can i solve that?
 
If i put the month in full it will solve the problem? if the solves the issue can you explain how can i do that.
 
 

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster June 2, 2022

Hello, Vanessa
 
Thank you for your reply.
 
We highly recommend using the suggested date or date string format if you want to filter by dates, show them on charts, etc.
 
If you need only to remove extra zeros after the comma, you can do it by explicitly setting the decimalPlaces property to 0.
For that, you need to define a new number format in the report:

report:{
        ...
        formats: [{
               name: "decimal0",
               decimalPlaces: 0,
        }],
}

Then, add this format to your month measure:

{
        uniqueName: "month",
        format: "decimal0",
}

Please check out the full example on the following JSFiddle: https://jsfiddle.net/flexmonster/63u71hx4/.
 
 
We hope it helps.
Looking forward to hearing from you.
 
Regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster June 9, 2022

Hello, Vanessa!

Hope you are doing well.

Our team is wondering if you had some time to check the suggested number formatting approach and remove the extra decimal places.
Could you please let us know if it works for you?

Looking forward to hearing from you.

Regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster June 16, 2022

Hello, Vanessa!

Hope you are having a great week.

Just checking in to ask if the suggested approach was helpful in removing the extra decimal places.

Looking forward to your response.

Regards,
Solomiia

Public
Vanessa Aguiar July 6, 2022

Yes, it helps, removing the extra decimal places resolve the problem. tks

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster July 7, 2022

Hello, Vanessa!

Thank you for your response.

We are glad to hear that our solution was helpful.

You are welcome to contact us if any further questions arise.

Regards,
Solomiia

Please login or Register to Submit Answer