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

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,760)