Forum Academy Marketplace Showcase Pricing Features

Creating then modifying a thing in the same workflow

Hi - second-time poster here!

I have the below set up for a form. The data is added to a User_Attributes table on clicking “Save”. The user needs to be able to choose imperial or metric for each of the attributes, which is why I need three separate radial switches.

Screen Shot 2020-09-15 at 19.11.28

I set up a workflow that went as follows:
Create a height thing with (height_imperial = height_imperial) and (height_metric = height_imperial X sum number) if the radial is set to lbs
Then another workflow step that would do the opposite if the radial is set to metric.

Then i had more steps to do the same for each of weight and waist. BUT the problem i stupidly didn’t think about is this creates three seperate things, when I want them all in one.

Then I made it so the first step is create, but the other steps for Weight and Waist I would modify a thing based on this search:
Screen Shot 2020-09-15 at 19.16.55
When I put that same search in a text box and pulled the unique ID, it worked. However, when i ran the workflow, it only did the first step with the heigh and didn’t modify the thing in the subsequent steps.

Any ideas why?

Thanks!

So my intuition tells me there’s a lot here that can be optimized.

  1. I think imperial vs metric should just be one toggle and it changes all your inputs. Set it as a state: system = “imperial” “metric”. Then change the input placeholders accordingly.

  2. Your daba type. Can you show me how it looks? I would personally have a data type: “Physical Details”, and in it a few values: Height, Weight, Waist, etc… and a “system” value where I store either “metric” or “imperial”. With that, I can easily standardize all measurements to say, metric, but know what the user’s preferences are to show them their own data in the system of their chosing.

  3. When creating a thing, just create one thing: Physical Detail. Load up all data either just as the user entered it, or (my preference) is to convert all values to a standard system (metric) when saving the user’s entered value. So I would have two steps: 1 if the user’s preference is metric, one if the user’s preference is imperial. IF it is state system = metric, save as is. If it state system= imperial, convert data to metric.

Why would I convert the data? In case you want to build a dashboard or do some data mining. It’s better to have all metrics in the same system.

Hope this helps!

Thanks for taking the time to respond.

  1. Currently, I have to allow each user to set a preference for their unit per the attribute. So, if they want to enter their height in imperial, but enter their weight in kilos, they can do that. I would have done it the way you suggest and it would save a lot of effort, but at this stage I can’t.

Screen Shot 2020-09-15 at 20.00.38
I agree with you that all the values should be normalized to metric regardless of what they enter, which is what I am trying to do with the data type (table) as above. You can see below how I am storing the data and cross converting depending on how the user enters the data. Thanks for suggesting that I store the users’ unit preference - I hadn’t done that, but it will be useful for displaying their data back to them.


  1. I have two create thing workflows, one that fires if the height toggle is set to imperial, and another opposite on that fires when set to metric.

My problem arises because the user can select their unit per attribute, i can’t add all the data points in a pair of workflow steps.
Here are all my steps. My problem is that the steps 4-7 where I wanted to change the attributes of the most recently modified thing in the table aren’t working.

Ok, quick question : What does the Make Changes to user step 1 do?

The same page has the option for the user to change their name and DOB. I didn’t show it in the screenshot.

I think i worked out a workaround. I figured that the created thing doesn’t actually exist until the end of the workflow. So I modified the workflow so that after the initial creation i set a custom state “Continue Workflow” to “yes”, and then I have another workflow that continues all the additional steps to modify the thing and then change the state back to “no”. It feels hacky, but it works.

If there are more efficient ways to handle it i would be interested to see them.

Thanks!

1 Like

So whenever I see so many workflows on the frontend, I get a little nervous. Your user will likely experience a long loading time. You’re rightly giving your user some feedback with the alert, but there’s a lot of work to be done on that workflow that checks 6 different conditionals in order to perform changes.

I figured out a way to do what you’re trying to accomplish with just one step in the front end: states
image

When the user changes the value of a toggle (in my case, a dropdown), I would update the state:
image

*Note that height feet and inches needs to be converted to decimals. I would also store this value in a state irrelevant if it’s feet or inches, or cm.

Then at the time of creating a new User Attribute, I would save the values as the user entered them, and save their measurement system per item like this:

*Notice that system fields are just yes/no. In my case, it would only be “yes” if it’s imperial.

Then I would send step 1 to a backend API WF for “processing”, meaning, to convert all values that are set to imperial into metric if imperial = yes. In the backend we can have several steps but wont affect the end user’s experience.

The benefit of doing it this way, albeit a little more “complex” is speed. We’re giving users a near-instant experience when saving their attributes.

Hope this can give you something to consider when building this for scale. Of course, if you’ve found something that works, that’s great too!