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 Apps
Unanswered

Offline collection

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All, 

I am creating app for offline mode and have two entities(Journey, and Triage)in CDS datasource.

Online scenario-  I have two screen, on one screen I fill the data and record gets created in journey entity. And I have second screen on which I fill more detail about particular record and when I submit, record gets created into Triage  entity with GUID column(Unique Identifier). Now, I have lookup field in Triage called "Journey Lookup" which is nothing but the GUID of the recent record inserted by the journey which we submitted on first screen.

How can I do that in offline mode?

In offline mode,  the issue I am facing is I have created collection and I have created GUID using GUID function in journey entity, and which I a inserting into "Journey_ID" text column in Journey entity. And using that column's result I was trying to link two entities.After inserting data If I come online then I patch record into entity and clear the collection and because of clearing the collection I am not able to link.

Code I used in patch of Triage entity-

'Journey Lookup': LookUp(Journeys,Journey_ID=Label12_2.Text)

In Label12_2 I am fetching the Guid of recent record which I created. And it is giving blank because I am clearing the collection. So it's not working.

Any help is appreciated

How can I achieve that?

Categories:
  • Pstork1 Profile Picture
    69,661 Most Valuable Professional on at

    Two suggestions

    1) When working online the app needs to be designed to use a local collection(s) for everything. Then when it detects that its online it syncs that collection(s) back to the online data source.  So as long as you have linked records all those records need to remain in the local collection(s).

    2) Your other problem I think is coming from using a GUID. Guids are often the index field for records and are managed by the online data source.  So you can't just create a new GUID when you are offline and then expect CDS to use that as the key field.  I would recommend creating your own index field that you can manage for the linked record and let CDS do its own GUID when you go online.  Another issue with GUIDs is that '=' usually doesn't work if you try to evaluate the GUID  as a string.  So your lookup may not be working right.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Pstork1 ,

    Thanks for your response!

    I used index column but still it is not working.

    If possible can you please provide me some example using index column considering my scenario for offline mode?

    Thanks in advance.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard