cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stujol80
Helper III
Helper III

SharePoint Integration Setting Variable

Hi, i have a powerapp form link to my sharepoint site. The powerapp form has multiple screens.

 

When the form is opened from SharePoint, a want the correct screen to load based on the status of the sharepoint record.

 

My SharePoint OnView and OnEdit has the below expression, where varStatus is the status of the record, 'SMR Register' is the SharePoint list.

 

Refresh('SMR Register');
Set(
varStatus,
SharePointIntegration.Selected.Status
);
Switch(
varStatus,
"Pending Review",
Set(
varStatusValue,
2
);
Navigate(Screen_Review),
"Pending Authorisation",
Set(
varStatusValue,
3
);
Navigate(Screen_Approval),
"Pending Implementation",
Set(
varStatusValue,
4
);
Navigate(Screen_Implement),
"Pending Verification",
Set(
varStatusValue,
5
);
Navigate(Screen_Verify),
"Pending CloseOut",
Set(
varStatusValue,
6
);
Navigate(Screen_CloseOut),
"Closed",
Set(
varStatusValue,
7
);
Navigate(Screen_Request)
);

 

What i am seeing is that my switch function is working correctly. When i first open my SharePoint form, varStatus isn't set. I have to open the form twice for varStatus to be set correctly. Any ideas?

11 REPLIES 11
ChrisTheGreek
Frequent Visitor

HI ALL?

any news about this issue? 

I came across to this problem myself 😞

Regards,

Chris

Hi @ChrisTheGreek ,

A bit further down the track now - Integrated forms will often not run OnStart or screen OnVisible if you simply change records as it sees the app and screen as "already open". You have to refresh/reload SharePoint before going to the next record or (as I do) do not use Variables set by either of these two actions and refer everything back to SharePointIntegration.SelectedListItemID, which always refreshes.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,160)