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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dataverse functions
Power Apps
Unanswered

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)
  • Kushal_M Profile Picture
    131 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
    131 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard