0 votes
in Rock by RachelAdams (550 points)
edited

How do I set a workflow attribute of connection opportunity to a value that was selected using a single-select workflow attribute?

This is for Hope City - they have certain teams at certain campuses, so on the application they will pick a campus, and it will then only show them the teams available at that campus using a single select field type instead of the connection opportunity field type showing them all the team options.

I am not sure how to get the single-select of what team was selected to then populate the connection opportunity to be able to create the connection requests.

I am testing it on this workflow before updating my main workflow.

by (13.1k points)
(Originally by Unknown) @RachelAdams I don't have a login for hope city, what's the single select look like right now? Is it just a comma separated list of text values?
by RachelAdams (550 points)
@Russell It's a single select, but if I need to do a defined value, it can be that as well. But if using a single select, it would be 1^Cafe,2^Greeter,3^Welcome, etc.

1 Answer

0 votes
by DavidTurner (14.9k points)
edited
 
Best answer

I would create a Single Select field for each campus. Then the form could show the appropriate single select depending on the campus selected.

The single selects would look something like this...

SELECT 
    CO.[Guid] AS [Value],
    CO.[Name] AS [Text]
FROM [ConnectionOpportunityCampus] OC
INNER JOIN [ConnectionOpportunity] CO ON CO.[Id] = OC.[ConnectionOpportunityId]
WHERE OC.[CampusId] = 4 -- Kingsway Campus
ORDER BY CO.[Name]

I updated your test workflow to reflect this. (also added WF to our CodeSnippets library)

Welcome! Here you can ask questions and receive answers (hopefully) from other members of our team.
...