cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Romsteck
Advocate III
Advocate III

Convert a String (Text) value to a formula

Hi there,

 

It is possible to convert a Text value to a formula ?

 

I need to create a lot of fields in my PowerApps, so I made a list of them.

Now I need to configure the controls to edit my data in D365, but I can't link the good field with it..

 

Does someone has a solution ?

 

Don't hesitate to ask me for more details about my App if necessary 🙂

Thanks in advance !

Have a good Day !

1 ACCEPTED SOLUTION

Accepted Solutions

@Romsteck 

 

Yes I understand what you are saying (maybe).

You want Runtime Evaluation in PowerApps. and you are asking how to do it.

 

You are looking for Eval like functionality in Javascript to use it for PowerApps.

 

So essentially you want an expression interpreter at runtime, something that can evaluate the text at run time and turn it into a Formula. 

 

@Romsteck  I believe this is not supported to evaluate the Formula from string, out of the box at this time.

 

You can try to upvote the below submitted idea:

Eval() function 

 

You can also try looking into PowerApps Component Framework. However, I am not sure that even if you go so far as to develop a custom component, that you can force PowerApps to evaluate a string and turn it into a Formula at run time. 

 

Was this what you were asking about?

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

What exactly do you mean? Text to formula as in you have a text field such as 

Collect(TestCollection,{Value:"Hello, World!"})

and you want to run that as code from text? 

Hi again @Anonymous ,

 

I have misunderstood what you said, sorry..

It's exactly what I mean 😉

My English is very bad 😅

 

So please do you have a solution ?

 

Thanks !

Up ! 😀

Anonymous
Not applicable

Could you please explain again what you're trying to do? Feel free to use your native language if you prefer. I'm sorry, but I just am not understanding your question.
poweractivate
Super User
Super User

@Romsteck 


@Romsteck wrote:

I need to create a lot of fields in my PowerApps, so I made a list of them.


You can add a Data Source from PowerApps, add a Form, and select your Fields, and then you can add fields without having to manually make any fields.

 

 

Hi @Anonymous,

 

So in French :

 

Je dois créer un formulaire comportant 300 champs. Il y a 4 champs par section de formulaire.

Je dois également configurer des contrôle de manières customisée (Utilisations d'Option Sets).

 

J'ai donc essayé de créer une Collection contenant les champs, je crée un Item pour chaque Sous-Section, et j'ajoute les propriétés "Name", "Display Name" et "Subsection".

 

Malheureusement, je ne peux pas faire en sorte que mes champs se configure automatiquement car les propriétés "Name" et "Display Name" doivent être entrées en tant que code.

 

N'hésitez pas à me demander plus d'infos !

 

Thank you !

 

Best Regards,

Romain.

Hi @poweractivate,

 

This is the way I use to create my form, of course, but forms become very slow when there is too much fields.

 

Best Regards,

Romain.

@Romsteck 

 

Yes I understand what you are saying (maybe).

You want Runtime Evaluation in PowerApps. and you are asking how to do it.

 

You are looking for Eval like functionality in Javascript to use it for PowerApps.

 

So essentially you want an expression interpreter at runtime, something that can evaluate the text at run time and turn it into a Formula. 

 

@Romsteck  I believe this is not supported to evaluate the Formula from string, out of the box at this time.

 

You can try to upvote the below submitted idea:

Eval() function 

 

You can also try looking into PowerApps Component Framework. However, I am not sure that even if you go so far as to develop a custom component, that you can force PowerApps to evaluate a string and turn it into a Formula at run time. 

 

Was this what you were asking about?

Thank you very much @poweractivate 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,210)