Expand my Community achievements bar.

Text Mode Column, can I access current record fields in a list method?

Avatar

Level 2

Is there a way to access the fields in the current record within a listmethod...

 

I am on a task record, I would like to show any Time Off date ranges that touch the current Task. So far I am only able to use the $$TODAY reference. I would like to replace the $$TODAY reference with the {task}.{actualStartDate} but that does not seem to work. Is this possible? Alterativly is it possible to define a variable and place the current task's actualStartDate into it and then use that in the listmethod?

 

displayname=Assignee PTO
listdelimiter=<div>
listmethod=nested(assignedTo.reservedTimes).lists
myvar={name}
name=Upcoming Time Off
stretch=0
type=iterate
valueexpression=IF({startDate}>=$$TODAY-3m and {startDate}<=$$TODAY,CONCAT({startDate},"-",{endDate},{myvar}),"")
valueformat=HTML
width=150

1 Reply

Avatar

Employee

Hi @GrahamSp2

 

Thank you for your question! No, you cannot directly reference the parent object's fields (e.g., {task}.{actualStartDate}) inside a collection's valueexpression. The context of the valueexpression inside a listmethod is the collection item (eg. reservedTimes), not the parent task. The only global variables you can use are wildcards like $$TODAY, $$NOW, etc.

 

- Monica