cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Weird behavior with SharePoint

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
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

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

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

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

Highlighted

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

View solution in original post

Highlighted

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (11,886)