AnsweredAssumed Answered

field calculation and sugar logic : concat a date with user format

Question asked by Gaelle Fernandez on Jun 4, 2015
Latest reply on Jun 4, 2015 by dkallish
Hello everyone !

In Sugar Pro 7.5.2, I'm working on the Cases module.

What i want :

I would like to generate the Subject field like that :

With the closure date set to the user format.

What i already have :
My two fields :
  1. The subject field i for the moment generated with the following formula :
  2. The closure date can be generate in two different ways : By default, it is the today date. But the user can chose another one, with the date picker. And always have it displayed to his format.

So i made some code in record.js to generate the closure_date.
i set it to yyyy-mm-dd format, and Sugar does translate it to the user format (france, so dd/mm/yyyy)for the display.

But the calculated subject goes wrong and display yyyy-mm-dd.

What should i have to add in my calculated formula for the subject?

Thanks a lot !

(for the moment i've set the closure_date dependency to hide the field when the case is not closed, and i've set the default value as today, and the subject is well displayed.
but i'm not sure the customer will approve the fact that the field is hidden.)