cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tejasvi_munge
Post Partisan
Post Partisan

Offline powerapps "Expected a record value but of a different schema " issue

Hi All,

Online scenario-  I have two entities journey and detail.  And I have two screen on one screen I fill the data and record gets created in journey . And I have second screen on which I fill more detail about particular record and when I submit, record should get created into detail with GUID column(Unique Identifier). Now I have lookup field in detail 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? Online is working. For offline I need to check if the record is created today having no end date and Buslookup value=lookup value for the logged in user from a Bus entity.  

I have this on App Onstart -

Tejasvi_munge_0-1594125543191.png

I have this on Onselect of submit button -
If(
Connection.Connected,
Patch('Triage daily Replicas',Defaults('Triage daily Replicas'),{
Temperature:Value(TextInput11.Text),
'Journey Lookup':LookUp(Journeys,'Bus ID Lookup'.Bus=GUID(TextInput7.Text) And IsBlank('Journey End Date and Time') And 'Created On'=Today())
}),
Collect(
TriagebyBusCollection,
{
cre08_temperature: Value(TextInput11.Text),
cre08_journeylookup:LookUp(
JourneyColletion,
cre08_busid.Bus = GUID(TextInput7.Text) && IsBlank(cre08_journeyenddateandtime) && IsToday(cre08_journeystartdateandtime))

}
);
SaveData(
TriagebyBusCollection,
"Saveitemstotriagebybus"
))

 

Any help is appreciated!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Tejasvi_munge ,

 

The column may be the saved as Logic Name with prefix (Rather than Display Name) when collecting Entity to Collection.Snipaste_2020-07-08_13-45-54.png

You can first input the 'cre08_journeylookup.' into the formula bar , then select the logic name of GUID field(Jounery) in the suggested doropdown list.

Hope this helps.

Sik

 

View solution in original post

3 REPLIES 3
v-siky-msft
Community Support
Community Support

Hi @Tejasvi_munge ,

 

The cre08_journeylookup is only the record of JourneyColletion, rather than Journey entity, however, the 'Journey Lookup' field requires a record of Journey entity, so this is the cause of the issue.

The workaround is to retrieve the record from Journey entity by GUID value in cre08_journeylookup using LookUp function.

Please modify the 'Journey Lookup' field in Patch formula as follows.

'Journey Lookup': LookUp(Journeys, Jounery=cre08_journeylookup.Jounery)

Hope this helps.

Sik 

Hi @v-siky-msft ,

Thank you for your response!It is giving me  error saying "Invalid argument type " and "Invalid use of '.' "

Tejasvi_munge_0-1594182547636.png

will this help me in offline mide?

Hi @Tejasvi_munge ,

 

The column may be the saved as Logic Name with prefix (Rather than Display Name) when collecting Entity to Collection.Snipaste_2020-07-08_13-45-54.png

You can first input the 'cre08_journeylookup.' into the formula bar , then select the logic name of GUID field(Jounery) in the suggested doropdown list.

Hope this helps.

Sik

 

View solution in original post

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 Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,161)