Two steps then? Shove the calculated value into a Custom State (anywhere… these are the equivalent of local variables as I’m sure you know) and then in next step format that previously computed value. It shouldn’t impact performance in any meaningful way.
I’ve run into more than a few evaluation order things like this in Bubble and, while annoying (boy parentheses would be helpful, right?), it’s easily solved by just doing another workflow step. In most cases, this type of workaround seems to have no more performance impact than a JavaScript where you have a more or less redundant line of code like:
Yeah, I do; however, I wasn’t using a workflow for this. I guess I could make one to trigger on page load…
The problem with states, though, is that I also have the same equation on a per-user basis. The users are displayed in a Repeating Group, and that number of users may vary across sub-apps.
So, I guess I could attribute a performance field to the “User” Type, calculate that field on page load?.. I’ll try it and report back.
In order to get the Overall Completion Percentage I created a custom state for the group container of all this text. I created a workflow that triggered on page load to do a search on “Tasks” that had been completed on-time, counted them and divided by Tasks that had been completed and counted them.
For the User Individual Scores it was the same logic, however, I had to create a Field for the Data Type “User”. On the same page load trigger, I ran a workflow updating the the List of Users from my repeating group, and updated their Performance Field with the new values. Then in the repeating group, I simply displayed “This Cell’s User’s Performance” field, formatted as a percentage.
I could not use state on the individuals because state would apply to the whole repeating group, not each user within that group. I had to use a data field to essentially serve the same function as a state.
I hope that helps someone in the future. Case closed.