cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lorem1960
Resolver III
Resolver III

Expected a Value Compatible with DataSource?

From my datatable named DataTable1, I want to be able to open the form FormDetails when users click on the column named PR #, on the OnSelect Action of my column I have this code:

 

Set(SelectedRecord,DataTable1.Selected.'PR #');EditForm(FormDetails);Navigate(FormDetails,ScreenTransition.None)

 

and power apps is not complaining, meaning no error message is being displayed. But when I check my FormDetails form for the Item : DataTable1.Selected here it complains with the message: Expected a Value Compatible with 'DataSource'

 

I am wondering what I am doing wrong here??

 

 

 

7 REPLIES 7
AmeerJab
Resolver I
Resolver I

Hello,

By understanding the above you want to change the value of only one column using a edit form?

 

Regards.

Basically, the FormDetails should open in Edit mode and users needs to be able to update 4 fields on that form. Strangely enough this used to work just fine. 

AmeerJab
Resolver I
Resolver I

Hello,

 

  1. Go to the form Default mode and set it as a variable ex.. "varDisplayMode"
  2. Add a button and set the OnSelect to Set(varDisplayMode,FormMode.Edit)

of-course if you want the form to return to view mode after editing you can add a button that will re-change the default mode and to save the changed values you can add a save button and put it visibility to be when the form has been changed to edit to appear.

 

Ps: for this to work you need your form to be Edit form not display form 

a bit confused here:

 

Lorem1960_0-1635246513256.png

How can I set or assign a variable here?

you can access the formula bar by either clicking on the word "Default mode" or from the dropdown in the top left.

 

  1. then in the formula bar add the variable name "varDisplayMode" ofc you can set the name to be as you want
  2. then add a button that will change your form to edit mode and set the OnSelect formula to be Set(varDisplayMode,FormMode.Edit)

 

 

ok I got point 1 now, So I suppose I need to add that button on the DataTable1 right? 

You can add the button on the screen, to be honest it doesn't have to be a button you can add the functionality on any component that has OnSelect method 

Helpful resources

Announcements
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 (1,719)