web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Linking a Form to row ...
Power Apps
Answered

Linking a Form to row in a Data Table

(0) ShareShare
ReportReport
Posted on by 433

Hello, friends.

 

I have a Form that I am trying to use to display additional data for the selected row in a Data Table.  It was working at one time but now it is not.  The form’s Item property is throwing the error “Invalid formula. Expected a value compatible with DataSource.”  I can't see the problem.  Maybe you can.

 

Here are some details:

 

Data Table: ‘Event List’

Data source-EventTable (in Excel)

Items=

AddColumns(

If ('Category selection'.Selected.Value="All",

Filter(EventTable,

Display<>"no",

'Submission Month'='Month selection'.Selected.Value),

Filter(EventTable,

Display<>"no",

'Submission Month'='Month selection'.Selected.Value,

Category='Category selection'.Selected.Value)),

"fmtDate", Text('Date/Time',ShortDateTime))

 

Form: Details

  • The Form displays three Data Cards for columns not shown in the Data Table
  • Data Source: EventTable (same as in Event List)
  • Item='Event List'.Selected
  • Error on Item: Invalid formula.  Expected a value compatible with DataSource.
  • Note: The bottom label successfully displays 'Event List'.Selected.Filename (Filename is one of the data cards listed in Details).

image.png

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @akharns are you still experiencing this issue?

     

    @Anonymous 

  • akharns Profile Picture
    433 on at

    Yes.  Nobody has replied yet and I have not found a solution.  Thanks for following up.  Any help will be appreciated.

  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    The AddColumns() is what is causing the issue. That creates a temporary collection of the data that is no longer lied directly to the actual data table. You could try removing the the AddColumns() and add a label to the gallery to display the formatted 'Date/Time'. However, if you must have the AddColumns() in the Items property then you need to add a Lookup() to the Item property of the form to get the selected record. 

     

    Example: Lookup(‘Event List’, 'Event List'.Selected.UniqueValueField = UniqueValueField)

    *UniqueValueField would be the name of the field with the unique value for the record

  • akharns Profile Picture
    433 on at

    Thank you very much for your reply.

     

    I think you're saying that I should convert my data table to a gallery to give me flexibility to use a computed field for the date, or do a new query back to the EventList table to get the additional data elements.   And I presume that the temporary table caused by the AddColumns is not accessible from my form.

  • Verified answer
    Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Sorry, I forgot that you were using a Data Table and not a Gallery. So you would need to change to a gallery to add a label and format it. The AddColumns is creates a temp table of records, so the DataTable.selected is pointed at a record on the temp table and not on your actual table and that is why you are getting the error.  

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard