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 / Dataverse functions
Power Apps
Answered

Dataverse functions

(0) ShareShare
ReportReport
Posted on by 2
I created a Dataverse function using Power Fx.   In this function i am using Collect operation to set the global option set value of a table record.  Now i am facing issue while deploying this in to a new environment.  solution import is failed with  "Name" isnt valid 
 
I have the same question (0)
  • Verified answer
    Kushal_M Profile Picture
    195 Super User 2026 Season 1 on at
    Hello 
     
    You are using Collect() inside a Dataverse function. Dataverse functions are server-side and stateless. However Collect(), ClearCollect(), Any operation that modifies a collection is NOT supported in Dataverse Functions.
     
    Instead of Collect(), update the table directly using Patch in the dataverse function.
     
    Patch(
        MyTable,
        LookUp(MyTable, MyTableId = recordId),
        {
            Status: 'My Global Choice'.Active
        }
    )
     
    🏷️ Please tag me @Kushal_M, if you still have any queries related to the solution or issue persists.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
     Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.

     

  • Sandeep Gunda Profile Picture
    2 on at
    Thanks for response for new record Patch function is not supported. 
     
  • Kushal_M Profile Picture
    195 Super User 2026 Season 1 on at
     
    Hello 
     
    Thanks for sharing the information !
     
    My view here is " Your Power Fx function is referencing a Global Option Set value by its label or environment-specific name, not by a stable, solution-aware reference. When you deploy to a new environment: Global Option Set labels may differ and Option Set internal names or numeric values may not match. Power Fx validates expressions at import time which results "Name" isn't valid. "
     
    Would it be possible to paste your Collect() formula here and internal option set internal names ?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 834

#2
Valantis Profile Picture

Valantis 533

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard