cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cperry07
Helper II
Helper II

Deep Linking SQL

Hello,

 

I have an application I built where I am using the deep linking function.

 

PowerApps Deep Linking - Send a direct link to a specific record/screen in your app with parameters ...

 

I originally was using SharePoint as a data source, but have recently moved over to SQL. When doing so I have experienced an issue with the form when the user is directed there. For some reason, it keeps getting stuck on "Getting your data." I'm assuming this is something pretty simple that I'm overlooking, but wanted to know if someone could help out.

 

For the Items property of the form I am using the following:

 

LookUp(SQLSource, Notification_ID=varRecord.Notification_ID)

 

When selecting the Gallery Item:

 

Set(varRecord, ThisItem)

 

And for OnStart of the application:

 

Set(
varRecordID,
Value(Param("RecordID"))
);
If (
varRecordID <> 0,
Set(
varRecord,
LookUp(
SQLSource,
Notification_ID = varRecordID
)
)
);
If(
Param("ScreenName") = "TestScreen",
Navigate(TestScreen),
false
);

 

 

5 REPLIES 5
DSut
Advocate I
Advocate I

Hi @cperry07 ,

Try changing the items property of the form to your varRecord variable.

It looks to me like you've already set the variable to the record via the on start or gallery selected item functions so there's no need to look it up again. 

Still getting the "Getting Your Data"

Only other thought is that you have multiple records in your variable when a deep link is used.

I.e. You might have duplicate values in you SQL Notification_ID column.

Does it work when navigating from a gallery selection where the varRecord is set to ThisItem?

If it does then check the variable to make sure it has a single record when using a deep link or Try adding First(varRecord) to the form items property to test for multiple records.

I haven't used the SQL connector before so if that doesn't work then hopefully someone else who has SQL experience can assist.

timl
Super User
Super User

Hi @cperry07 

To diagnose this further, here are a couple of things that I would try. If you add a label and set the text property to the following, does it display the correct notification ID?

 

varRecord.Notification_ID

 

Also, if you were to set the items property of the form so that it looks up the record based on the record ID variable, does your form still get stuck on "Getting your data."?

 

LookUp(SQLSource, Notification_ID=varRecordID)

 

 

cperry07
Helper II
Helper II

OK

@timl @DSut 

 

Well this is embarrassing. I copied some of the coding over from the SharePoint application I had built over and forgot to update the URL to the new application LOL. So it works now HAHAHA. Thank you for your help guys

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,088)