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 / Weird behavior with Sh...
Power Apps
Answered

Weird behavior with SharePoint

(0) ShareShare
ReportReport
Posted on by 1,088

I have two separate SharePoint Sites that are the same (I created one from a template of the other).  So all field names, settings, etc, same.

 

I have a PowerApp that uses a SP list in one site and I have a copy of the PowerApp that uses a SP list in the other site.  I used export/import to get the duplicate PowerApp then went in and changed the data connections.

 

The weird part is the second powerapp comes up with an error in the formula for MaxLength on a dropdown box.

 

Original that works just fine:

DataSourceInfo([@VirtualPZone], DataSourceInfo.MaxLength, "OpeningType")
 
 But in the duplicated PowerApp running with data from the duplicated SharePoint list, it doesn't like this formula and says the function has some invalid arguments.  IT IS EXACTLY THE SAME..??
 
Then if I play with it, the only thing I can get it to accept without error is: 
DataSourceInfo([@VirtualPZone], DataSourceInfo.MaxLength, "Opening_x0020_Type")
 
But then my PowerApp doesn't work...no errors just doesn't save the form.
 
How is this possible?  Again everything is exactly the same between the two, just two different SP Sites that are exactly the same?
 
Thanks,
Terry
Categories:
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Mattw112IG ,

     

    MaxLength means the Maximum number of characters that the column can hold.

    I would recommend you to delete the original code and re-enter it manually.

    If this still doesn't work, you can try to hardcode the Length in MaxLength property. In general, the max length of the column is 255, so just enter 255 into MaxLength property. Also, you can go to List settings, select the column to confirm the Maximum number of characters.

    Snipaste_2020-04-02_15-26-58.png

    Hope this helps.

    Sik

  • Verified answer
    Mattw112b Profile Picture
    1,088 on at

    I found that this was an issue with renaming a SP column.  Even though it looks right on the backend it is still the original name.  PowerApps wanted the original name and when I exported my package and reimported in a different environment it didn't like the name change.

    Terry

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Mattw112IG ,

     

    Yes, you are right. PowerApps only recognizes the initial column name of SharePoint list, not the modified column name, which is a consistent universal problem.

    Could you please mark your post as the Solution to help other members find it more readily?

    Sik

  • high-solutions Profile Picture
    26 on at

    Sorry for replying so late, but how exactly did you solve it? 

     

    I have somewhat the same problem but simply renaming it back to the original doesn't fix it for me, still same issue..

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
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard