cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mistaah_G
Frequent Visitor

Id renamed to 'Id (ID)' in lists used in PowerApps results in SharePointIntegration.SelectedHidden error

Hi everyone,


I had to change a SharePoint list PowerApps form that I didn't modified in a while. When I opened the form I got several errors on the 'Id' column for multiple lists. For example in a Lookup(List, Id = 123) function. It appeared that all these columns had to be renamed in 'Id (ID)'.
So far so good, but in the end there were still remaining 2 errors:
- The name is invalid. This id isn't recognized
- Invalid argumenttype
These 2 errors come from the location "SharePointIntegration.SelectedHidden". When you click on it you are redirected to the "Datasource" field where you haven't anything like "SharePointIntegration.SelectedHidden".

I googled a bit and this braught me to this post:
https://powerusers.microsoft.com/t5/Building-Power-Apps/fix-an-error-in-SharePointIntegration-Select...

The people overthere have also problems with the SharePointIntegration.SelectedHidden faults. But there the problem is that an old list reference is in the .msapp file.
In this .msapp file you have a file with the following in it:

{
"Property": "SelectedHidden",
"Category": "Data",
"InvariantScript": "LookUp('Opstart audit', Id = SharePointIntegration.SelectedListItemID)",
"RuleProviderType": "Unknown"
},

As you can see there is a hidden lookup that you can't see in the PowerApps interface. The Id in the lookup is still the old value and not 'Id (ID)' as it should be according to PowerApps. So i thought to change this to 'Id (ID)' and follow the steps from the post I mentioned above. Everything seems fine, except when I open the app again after I imported him, the "OnCancel", "OnEdit", "OnNew", "OnSave", "OnView" actions are gone. I tried several times changing the value and upload it again to PowerApps, but nothing worked.

So my actual question is:
- Does anyone know about Id being renamed to 'Id (ID)' in PowerApps for SharePoint lists?
- Can I do something about this Id, so that I can still use the standard Id column instead of 'Id (ID)'?
- If Id renamed to 'Id (ID-)' is expected behaviour, how can I solve this? The method that I described above following the blog post doesn't work.

Thanks in advance for any advice!

P.S. I have the above issue on more then 1 list with PowerApps integrated form!




12 REPLIES 12

Unfortunately, I did reproduce these forms and it did solve the problem but it took 5 days to do so. Would be great if someone would fix that problem, because it is time-consuming solution.

Mistaah_G
Frequent Visitor

So I finally got a solution by the DEV-team from Microsoft!

This is what you got to do:
1. Go to the form where you got the SharePointIntegration.SelectedHidden error in the PowerApps editor
2. Open the browser development console (F12)
3. Type in these instructions in the console:

var entity = AppMagic.context.documentViewModel.entityManager.tryGetEntityByName('SharePointIntegration');

var rule = entity.globalRuleManager._getOrCreateSingleRuleManager(entity).getOrCreateRuleViewModel('SelectedHidden');

rule.rhs // get the current rule value for the hidden property

rule.setRhsAsync("LookUp([@NAMEOFYOURLIST], 'Id (ID)' = SharePointIntegration.SelectedListItemID)") // Edit the rule value to whatever you need. Change the list name and the lookup column.

rule.rhs // Check that the rule value updated successfully
4. Change all the references to datasources in your app that use the .ID column to .'Id (ID)'
5. Now you will have no more errors.
6. Save the app
7. Reload the app to check, the error disappeared.
8. Publish your app without any faults 🙂

Great! This solved the issue on three different lists. Thanks for sharing!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (71,065)