Notifications
Announcements
Hi,
Is in in anyway in powerapps possible that a string like
"2 + (4*3)"
or
"1,2 * (12^0,7)"
is evaluated to its mathematical result at runtime in powerapps?
Hi @HansHeintz
Can you please share more details about this? I want to understand how you are generating the dynamic expression. If there is a specified format that will be used, then you can use the expressions directly.
E.g. If you want to evaluate "2 + (4*3)" on button click, you can set the OnSelect property of the button control as:
Button -> OnSelect -> 2 + ( 4 * 3 )
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
for example: Iwant users to express the upper norm level of a blood test as a realtion to theor weight: 60+ 1,2*G
Where G is weight. I can then substitue the weight of a patient for G and have software evaluate the result. Also i want users to express the dosage of a medicin as 0,2*G^0,7 (dosage being linear relative to body surface and not weight,which makes a big difference with various types of dogsThese are just examples. I might work around these particular examples but it would be nice if an expression parser might be available through powerapps
Simple calculations can be done using mathematical operators like those you referred to.
0,2*Label1.Text^0,7
without using strings. In the example on the left your function is the text property of a label that references a control and would be dynamic.
I don’t want to sound ungratefull but that is whst i mean with working around the examples. i mean something like this
https://awesomeopensource.com/project/ArashPartow/exprtk
meanwhile i guess answer is: not possible
@HansHeintz
I am afraid but this is not supported as per current capabilities, if you think this should be added, then please raise an idea or upvote if exists already here: https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas
Similar to Arach's solution, you could parse the string for numbers and formula elements and evaluate them that way. Would be a big job in Power Automate though, think this would fit better in an Azure function to be called from your flow/logic app.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 717 Most Valuable Professional
Michael E. Gernaey 329 Super User 2025 Season 2
Power Platform 1919 268