Showing results for 
Search instead for 
Did you mean: 
Post Prodigy
Post Prodigy

Call code based on txt in datasource?

I have a datasource (dataverse) that have a textcolumn called "dothis"

In this column i store things like "ThisItem.Username" or "Navigate(STARTSCREEN)"


Is it possible to trigger code from a datasource.

if(variable1 = true; ThisItem.dothis)

so that it would perform the code in that column text?


Super User
Super User

Hi @Oskarkuus ,


This is not possible the way you think,

Since code in column will be read as text and not the code itself.


You can do something similar like,


if(thisitem.dothis = "Create Record",
  <Patch a new record code>,
  if(thisitem.dothis = "Delete Record",
     <Delete the record code>


Hope this helps



I had a hope to be able to call code insteade of putting it on controls. It is a mess when u build more advance app with many datasources... 

Yeah I know @Oskarkuus ,


I've been there few months back and wanted to build something dynamic within components.

Doesn't happen like that unfortunately.


Good luck 🙂

Helpful resources

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,082)