Workflows Tips #16: Secrets for Dragging a Value, Converting App Assignment, and Referencing Variables From a Helper Flow
Tags: nocode, workflows, okta, automation
Published: 2022-08-24 18:47:26

---
title: Workflows Tips #16: Secrets for Dragging a Value, Converting App Assignment, and Referencing Variables From a Helper Flow
published: true
date: 2022-08-24 04:25:42 UTC
tags: NoCode,Workflows,Okta, automation
canonical_url: https://maxkatz.net/2022/04/15/workflows-tips-16-secrets-for-dragging-a-value-converting-app-assignment-and-referencing-variables-from-a-helper-flow/
---

{% embed https://dev.to/oktaworkflows/okta-workflows-tips-57bj %}

In this post:

- Secrets for dragging and dropping a value
- Convert application assignment
- How to reference variables from a helper flow

## Secrets for dragging and dropping a value

Ok, this tip is going to be in a different format (hey, I’m just trying this). This question was posted in [MacAdmins Slack channel](https://www.macadmins.org/) and the wonderful folks there offered their solutions which I’m posting below as well.

This question was posted by [Ylan Muller](https://www.linkedin.com/in/ylanmuller/), an avid Okta admin and certified consultant, member of the [MacAdmins Slack Community](https://www.macadmins.org/), and the IT Manager at [FireHydrant](https://firehydrant.com/):

> Does anyone have any secrets for dragging and dropping a value from the beginning of a workflow to a card towards the very end? I have a workflow that is lengthy and it takes a longggg time to map values to cards that are on either end from each other. In IPaaS tools I’ve worked with in the past it can discover value names from other cards so you can easily search and map, but I don’t think Okta Workflows has that?

These are solutions posted by Workflows community folks.

_This tip is from Rob. Rob is IT Manager at [Fulcrum](https://www.fulcrumapp.com/)—the leading field inspection management platform—where he manages their SaaS portfolio, IAM, SOC 2 compliance, and other fun things as they arise. He has been a Mac fan since he got a used 512Ke in 1988, and has been managing Macs since 1999._

[![Dragging a value in a flow](https://katzmax.files.wordpress.com/2022/04/workflows_tips16_drag_value_anywhere.gif?w=640)](https://katzmax.files.wordpress.com/2022/04/workflows_tips16_drag_value_anywhere.gif)
<figcaption>Dragging a value in a flow</figcaption>

> FWIW, you can drag a value from anywhere you already have it mapped in your flow; and, the original value is used.

_This tip is from [Pete Viri](https://www.linkedin.com/in/pete-viri-64b29165/). Pete is an Okta Certified Professional, with over of 10 years of IT experience currently working as a Systems Engineer at Airtable._

> you can use dummy cards to hold the value for you so you don’t lose your place incase you misdrag

_This tip is from [Bill Easton](https://www.linkedin.com/in/iam-billeaston). Bill is a Security Tech Lead at [Redox](https://www.redoxengine.com/)._

> You can use the Assign card (multiple times) and distribute them on long flows, so you don’t have to scroll back so far. You can also use it as the dummy cards.

And here is another tip/solution from [Pete Viri](https://www.linkedin.com/in/pete-viri-64b29165/):

> if you’re dragging a lot of values, just put the target card at the beginning and drag all the values first, then drag the card to the end so you dont have to drag multiple things a long distance

_And one more from [Gabriel Sroka](https://www.linkedin.com/in/gabrielsroka/). Gabriel is an Okta expert and developer of the [rockstar](https://gabrielsroka.github.io/rockstar) Chrome extension. Gabriel also hangs out in the [MacAdmins](https://www.macadmins.org/) #okta-workflows Slack community._

You can pin the first card. Then you can scroll the flow to any card further in the flow and make a connection to that card.

[![Pushpin to lock in the first card for easier connections](https://katzmax.files.wordpress.com/2022/04/workflows_tips16_pin.png?w=1024)](https://katzmax.files.wordpress.com/2022/04/workflows_tips16_pin.png)
<figcaption>Pushpin to lock in the first card for easier connections</figcaption>

## Convert application assignment

_This tip is from [AJ Ahrens](https://www.linkedin.com/in/arthur-a-756209188/), Workflows Team Lead at Okta._

When a person gets added to applications from self-service or some other process, you may want to convert them to Group assigned or convert them to User assigned to remove/re-add to the app if needed.

You can do this with a POST call to the following end-point:

```
 /api/v1/apps/{applicatID}/users/{userID} 
```

using scopes query object passing in either `GROUP` or `USER`.

[![Custom API to convert application assignment](https://katzmax.files.wordpress.com/2022/04/workflows_tips16_group_endpoint.png)](https://katzmax.files.wordpress.com/2022/04/workflows_tips16_group_endpoint.png)
<figcaption>Custom API to convert application assignment</figcaption>

Ok, here is an example. A user is a part of a group and the group is assigned to a graphics application. You need to remove only this user from accessing the graphics application. You change the user’s assignment for the graphics application from group to user. Now that this user is no longer part of a group , you can remove only the user’s access to the graphics application.

## How to reference variables from a helper flow

_This tip is from [Tim LaBorn](https://www.linkedin.com/in/tim-laborn-b0574a10?lipi=urn%3Ali%3Apage%3Ad_flagship3_profile_view_base_contact_details%3Bi0CgDUK6R2%2BzP3YE%2FlNp1Q%3D%3D). Tim is a Senior Technical Support Engineer for Workflows at Okta._

A flow can call another flow called a helper flow. When the helper flow is done it can return values back to the calling flow. To reference those variables, the names of the variables in the calling flow (also called parent) need to match the names in the helper flow.

[![Calling (parent) flow](https://katzmax.files.wordpress.com/2022/04/workflows_tips16_calling_flow.png?w=1024)](https://katzmax.files.wordpress.com/2022/04/workflows_tips16_calling_flow.png)
<figcaption>Calling (parent) flow</figcaption>

In the image above, **Flow Control – Call Flow** is calling **Calculate\_helper** flow. Two numbers ( **number1** and **number2** ) are passed to the helper flow. **number1** is the name of the variable and **input1** is its value. That’s the input part.

The blue rectangle shows the result or the return values from calling the helper flow (that’s the output part). In this example **resultSum** and **resultMultiply** variables will be returned.

Now, looking at the helper flow below. Notice that in **Flow Control – Return** card, the two blue arrows point to two variables, **resultSum** and **resultMultiply** , and these names match exactly the names in the return section from the calling flow (above). So that’s exactly how you setup and reference variables in calling/helper flow.

[![Helper flow](https://katzmax.files.wordpress.com/2022/04/workflows_tips16_helper_flow.png?w=1024)](https://katzmax.files.wordpress.com/2022/04/workflows_tips16_helper_flow.png)
<figcaption>Helper flow</figcaption>

Another way to look at it:

- Calling (parent) flow: setting an empty variable
- Helper flow (return card): assigning a value to a variable.

* * *

Two resources to help you learn more:

📌 Try this step-by-step getting started tutorial: [Build Your First Automation With Okta Workflows: Notify When User Is Suspended](https://dev.to/maxkatz/build-your-first-automation-with-okta-workflows-notify-when-user-is-suspended-1l3p-temp-slug-2933517).

📌 All the [Workflows resources](https://dev.to/maxkatz/okta-workflows-resources-1ebi) (docs, tutorial, office hours, templates, office hours and more)