1 Getting Campus via SQL (in a workflow) 2 Bronson Witting posted 10 Years Ago I'm trying to set a Campus attribute in a workflow to the campus that is set on a Person's record (to assign the workflow to the approprate group based on campus). I have accomplished this successfully with a Run SQL workflow action. Here's My SQL: DECLARE @PersonAliasGuid uniqueidentifier = '{{ Workflow.Person_unformatted }}' SELECT dbo.Campus.Name FROM dbo.GroupMember JOIN dbo.[Group] ON ( dbo.GroupMember.GroupId = dbo.[Group].Id ) JOIN [Person] ON ( dbo.GroupMember.PersonId = dbo.Person.Id ) JOIN dbo.[Campus] ON ( dbo.[Group].CampusId = dbo.Campus.Id ) JOIN dbo.PersonAlias ON ( dbo.Person.Guid = dbo.PersonAlias.AliasPersonGuid ) WHERE dbo.[Group].GroupTypeId = 10 AND dbo.PersonAlias.Guid = @PersonAliasGuid; Here is the example in the Working with Workflows documentation: DECLARE @PersonAliasGuid uniqueidentifier = '{{ Workflow.Requester_unformatted }}' SELECT [Gender] FROM [Person] WHERE [Guid] = @PersonAliasGuid My example is working, but I wanted to make sure I'm doing this correctly. The example is trying to select the Alias GUID from the Person table, but that doesn't exist - I had to join the PersonAlias table to get this to work. Also, I used the GroupTypeId of 10 for the "Family" group type. Is this type always ID 10, or should I be deriving a person's campus another way? If anyone can help me wrap my head around this more, I'd be greatful. Thanks!