Setting a state(number)from a text element not working

Hi guys,

I’m trying to set the value from INSIDE of a text element (which is a number that results from a formula) to a custom state - FINAL PRICE STATE (number). What is going on here?!

I’ve tried to put the “value” (which should be a number) of that text directly into “create a thing” but it didn’t work out so that’s why I craeted a custom state.

2 Likes

Hard to say without more info, but you don’t seem to be converting the text back to a number (using the ":converted to number"expression) which if you do, you can formula result right into the new “thing”

Text elements don’t have values… if that’s what you’re trying to do?

what are you actually trying to do here?

1 Like

@adig can you provide little more context to understand the problem better? If you want, we can jump on a quick google meet call and guide/help you through it.

Thanks @adamhholmes and @code-escapee

So I’ve got a value showing correctly ( a price)in this text element below:

then….I want this value passed into a “make a change to a thing” flowbelow:

2 issues:

  1. I cannot call that text element and input it dynamically after “='“ to populate that DB field.

  2. I tried to set a “number” state on that text element to save the value from inside that text in pic 1 as a number and then put it in booked_total_amount_usd but when I try to set the state, again I cannot call that “text’ to get the value.

Well, as I said.. Text Elements do NOT hold accessible values (they only display text) so you can’t refer to the ‘value’ of a text element elsewhere.

So, you either need to use the same expression wherever else you need it or (preferably) store the value somewhere else (i.e. in a Group Data variable) and then use that wherever you need to display it or use it.

2 Likes

thanks @adamhholmes I cannot put the value in booked_total_amount_usd because that value is dynamic - it depends on another state and I cannot condition it into “make changes to a thing”. however, the one in the text field is correct because it’s calculated depending on that state.

What’s the other option? What is a group data variable?!

@adig , you have two options.

Option 1 (simplest)
Don’t reference the text at all.
In Make changes to a thing, rebuild the same dynamic expression you used in the text.

If it depends on a state, that’s fine as it’s available in the workflow.

Option 2 (cleaner / reccomended)
Make the Group hold the value.

  1. Add a Group
  2. Set Type of content to number
  3. Set the Group’s data source to the dynamic price expression

Then:

  • Text → Parent group's number
  • DB save WF → Parent group's number
1 Like