Hi G, (I think I know what you are after since we are on a parallel path you actually have to use another hidden field on your form to store the RecId of the name selected.)
We are using the following in an SR:
Field Name: Reported For:
- Default Value (expression): CurrentUserField ("DisplayName") : (I set this for the logged in user by default but allow them to change it to their assignment.)
- Visible: if CurrentUserRole() == "Self Service" then true else false
- Pick List: Validation list "Employees", Title Field "Display Name"
- Unique ID: FFReportedFor (I use FF for form field)
Field Name: Reported By:
- Visible: if FFReportedFor.selected.Employee.DisplayName == CurrentUserDisplayName() then false else true (Only if they change the name in Reported For do we display their name as confirmation)
- Pick List: see above
- ReadOnly: Yes
Here's the trick
Field Name: ReportedForRecId
- Default Value: FFReportedFor selected.Employee.RecId
- Field Visible: No
- Unique ID: FFReportedForRecId
REPEAT THIS FOR "ReportedBy"
In your workflow, set the following using an Update Block: (Use the Overwrite checkbox)
Contact Link: $(GetSRPValue(RecId, "FFReportedForRecID"))
AlternateContactLink: $(GetSRPValue(RecId, "FFReportedByRecID"))
AlternateContactLink _Category: Employee
This should get you the variables you need and set up the new SR with the names from your form. I beat my head on this for several weeks so I hope this will save you time.
Good luck - Mark. ;-)
you need to use the CurrentLoginId() function for this. Typically the pick list for Employee uses the LoginId as the value field not the display name as shown below:
So to use the list in an SR you just need to call it as so:
And set the validation/pick list to use:
Thats it when you go to log a new request it will auto populate with the current users details:
If you get stuck just shout.
Aha! Many thanks to both of you!
Sorry for all the questions, but what do these fields do?
- Contact Link: $(GetSRPValue(RecId, "FFReportedForRecID"))
- ProfileLink_Category: Employee
- AlternateContactLink: $(GetSRPValue(RecId, "FFReportedByRecID"))
- AlternateContactLink _Category: Employee
On our incidents and service requests we only have a customer field - assuming that is standard, but not sure.
There is a hidden reported By field on both objects, this is for those who wish to logged who the request is for and who logged it for example a PA logging a ticket for a director. Both parties could then be notified at each step in the process.
- Contact Link, alternate contact link and profile lunk would all link back to the employee object each with its own relationship. These field hold RecId and usually form 2 fields in the database ProfileLink_RecId (record identifier in the related object) and ProfileLink_Category (name of related object)
- ProfileLink_Category: ProfileLink_Category (name of related object) in this case Employee.
- $(GetSRPValue(RecId, "ParameterFieldName")) - this grabs a parameter value form the current service request being considered by the workflow or quick action.
- Link to help: HEAT Service Management Online Help