Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Offline app trigger flow condition

Like (0) ShareShare
ReportReport
Posted on 24 Jul 2020 13:04:12 by

Hi All,

I am trying to create an app for offline mode. My scenario is -

I am saving data into collection in ofline and when online patching data to source. Also triggering a flow. Now what I want is - I want to before triggering a flow I want to check if temperature >=38. If yes then trigger a flow else not.

How can I do that?

I tried using if(cre08_temperature>=38,....,....) but it is showing me error "Name isn't valid " 

On app OnStart i have below code-

If(
!IsEmpty(TriagebyBusCollection.cre08_temperature) && Connection.Connected,
ForAll(
TriagebyBusCollection,
Patch(
'Triage daily Replicas',
Defaults('Triage daily Replicas'),
{
Temperature: cre08_temperature,
Cough : cre08_othersymptoms,
'Seat Number Dummy':cre08_seatnumberdummy
}
)
);

//here i want to check if  temperature >=38

ForAll(
TriagebyBusCollection,
PowerAppsbutton.Run( cre08_temperature));
);

  • Joel CustomerEffective Profile Picture
    3,224 on 24 Jul 2020 at 13:20:33
    Re: Offline app trigger flow condition

    I recommend using an automated flow rather than calling the flow from your app.

     

    It looks like your connection is CDS based on the field name in your question (if not see below). if you are using cds,  you can do this in your flow trigger and not call the flow from the app at all.

    create a flow from a solution

    use the common data service current environment connector

    choose the trigger when a record is created, updated or deleted

    jlindstrom_0-1595596373382.png

     

    set the trigger condition to create, select your entity, and organization for scope

    jlindstrom_2-1595596484580.png

     

    In the filter expression, add an odata query expression for your condition. it would be something like

    cre08_temperature GT 38

    You might need to put single quotes around the 38.

    this will make the flow only run when a record is created with a temperature greater than 38--even if the record is patched after being offline

     

     

     

    If your source is SharePoint or some other source, have your flow triggered when an item is added, then add a check condition step to check for the condition.

     

    you cannot mix conditional flow calling in the patch formula. My approach is better because it is more dependable and does not require sharinig the flow or flow ownership with the app users. and it runs dependably if the user is connected online or patching after being offline.

     

    @Anonymous  if this answers your question, please mark it a solution.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,011 Most Valuable Professional

Leaderboard
Loading started