Modify Data Grid column to display hours/days from creation date to X days ago

0
hi, I would like to the time stamp column to reflect how many days ago, the record was created.  how would i go about doing this?  i don't see a way to assign a function or aggregate on a column other than the default sum, min,max, etcs.  for example, if record was created today at 12PM and its 2pm now.  I would like to say " 2 hours ago " and tomorrow "1 day ago"  thanks 
asked
4 answers
1

Hi Phillip,

You can create a string attribute in your entity and set the value to be calculated and not stored. This will allow you to run a microflow to calculate what the value should every time its retrieved. What you return in the end event of the microflow will be displayed in the datagrid.

Here is the documentation for calculated attributes. 

https://docs.mendix.com/refguide/attributes

 

Hope this helps!

answered
0

I have the Entity "Project" in the Domain Model 
Project_name 
Aging (date and time)  microflow 
Create_stamp(date and time) default to [%currenttime%] 

in the microflow being called by the Aging attribute , i'm using the change variable entity type however I can't get the \Create_stamp as an option to subtract from in the calculation.  

any ideas? 

 

answered
0

any ideas why my $project\create_stamp doesn't come up when i enter the '$' as one of the options ?

 

answered
0

Hi I need to highlight time in Green if within the 30 minute window of the stipulated shift timings and Red everything beyond that. We have 3 shifts with 9am, 10am & 11am. Can you help, I am struggling to do that. Thanks & RegardsHi I need to highlight time in Green if within the 30 minute window of the stipulated shift timings and Red everything beyond that. We have 3 shifts with 9am, 10am & 11am. Can you help, I am struggling to do that. Thanks & Regards Plex Lucky Patcher Kodi

answered