cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
akharns
Level 8

Linking a Form to row in a Data Table

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

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Linking a Form to row in a Data Table

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.  



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
5 REPLIES 5
Administrator
Administrator

Re: Linking a Form to row in a Data Table

Hi @akharns are you still experiencing this issue?

 

@TopShelf-MSFT 

akharns
Level 8

Re: Linking a Form to row in a Data Table

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

Super User
Super User

Re: Linking a Form to row in a Data Table

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



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
akharns
Level 8

Re: Linking a Form to row in a Data Table

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.

Super User
Super User

Re: Linking a Form to row in a Data Table

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.  



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 215 members 4,300 guests
Please welcome our newest community members: