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 / URGENT help please! Ad...
Power Apps
Answered

URGENT help please! AddColumn disrupting Edit button from Gallery to Form????

(0) ShareShare
ReportReport
Posted on by 802

Hi there,

 

I have a Gallery which comes from Dataverse, and the Item's property includes AddColumn which is needed to evaluate three dates to find the earliest date, and sort the Gallery based on this date in ascending order. This sorts all fine. Code is:

 

Sort(AddColumns('Travel Requests',"EarliestDate", First(Sort(['Rail Date', 'Taxi Date', 'Accom Check-in date'],Value,Ascending)).Value),EarliestDate,Ascending)

 

In the Gallery, however, is an Edit button. Before I added the AddColumn and Sort elements above, OnSelect of this button is set to 

Set(selectedTravItem, ThisItem)

and this worked originally.

 

Below the gallery on the same screen is a Form connected to the Dataverse table (Data Source property) and Item = "selectedTravItem". 

 

Since adding the AddColumns to the Gallery, the Form displays an error in Item property of "Invalid formula. Expected a value compatible with 'DataSource'. Before I did this, the Edit button displayed the item in the Form for the user to edit, which I want to re-enable.

 

How can I fix this so that when the user selects Edit on that gallery item, they are presented with the information in the Form's data cards?

 

Thanks

K.

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,456 Most Valuable Professional on at

    Hi @Kosenurm ,

    I am a SharePoint user, but the issue is the same - the added column is not in the Data Set the Form is based on - assuming you have a unique identifier, you need

    Set(
     selectedTravItem,
     LookUp(
     YourTableName,
     YOurIdentifier = ThisItem.YourIdentifier
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard