We got a requirement to denote an unsaved record with * in a session.
Below is the scenario.
- User opens an Account record in USD
- USD opens a new Account Session
- User clicks ‘Create Task’ link from Agent Script.
- System should display * on ‘Task’ Tab until it gets Saved.

It’s very easy to achieve using ‘Scriptlet’.
Add a Scriptlet “SetTaskTitle” and set to the hosted control’s Display name (i.e., [[$Scriptlet.SetTaskTitle]] )
In the “SetTaskTitle” Scriptlet
- if Task.Subject == “”
- Set DisplayName=”Task *”
- Else
- Set DisplayName=”Task.Subject”

Script Text:
function SetTaskTitle() {
if (“[[task.subject]+]” != “”) {
return “[[task.subject]+]”;
}
else
return “Task *”;
}
SetTaskTitle();
Once the Task gets Saved, Tab name changes to ‘Task.Subject’

🙂


![[Step by Step] Configure and run 'Pipelines in Power Platform'](https://rajeevpentyala.com/wp-content/uploads/2024/08/image.png)
![[Beginners] Power Fx: ShowColumns, AddColumns, RenameColumns and DropColumns](https://rajeevpentyala.com/wp-content/uploads/2024/04/record-ezgif.com-video-to-gif-converter-1-2.gif)
Leave a comment