cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
J_Hazel
Level: Powered On

Possibility of triggers and prompts in PowerApps

Hello,

I am developing an Equipment Inspection App where I would like it to include a "Weekly Inspection" checklist and a
"Daily Inspection" one.

Is it possible to have a trigger or flow built into the app so the user is prompted to make a certain selection or, be directed to a certain form, given certain conditions in the SharePoint list?

What I am aiming for is that the app would see if an inspection has been done that week - i.e. whether an entry from the "Weekly Inspection" Form had been submitted to the connecting SharePoint list. If not, it would then start a "Weekly Inspection" / send the user to that specific form or, prompt the user that it was time to complete this. If the "Weekly Inspection" had been done already, the user would instead be directed to do a simpler "Daily Inspection" one / promoted to complete the "Daily Inspection" form. 

Any ideas /advice regarding this would be great.

Thanks so much.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Possibility of triggers and prompts in PowerApps

Hi @J_Hazel,

Do you create a separated "Weekly Inspection" SP list and "Daily Inspection" SP list to store the Inspection records on your side?

The triggers are not supported within PowerApps currently, if you want to add a trigger or flow into your app to alert the user to make a certain selection, I afraid that there is no way to achieve your needs.

As an alternative solution, you could consider detect if there is already one record submitted for current week within the "Weekly Inspection" SP list, if yes, navigate the user to the "Daily Inspection" form to do a simple "Daily Inspection", if no, naviate the user to the "Weekly Inspection" form and prompt him that it was time to complete this.

I have made a test on my side, please take a try with the following workaround:7.JPG

Set the OnStart property of the first screen of your app to following:

If(
    !IsBlank(
        LookUp(                         /* Check if there is already one record submitted for current week within your "Weekly Inspection" SP list */
             'YourWeekLyInspectionList', 
             Value(Text(Created,"[$-en-US]yyyymmdd")) >= Value(Text(DateAdd(Now(),-Weekday(Today())+1),"[$-en-US]yyyymmdd")) &&  
             Value(Text(Created,"[$-en-US]yyyymmdd")) <= Value(Text(DateAdd(Now(),7-(Weekday(Today()))),"[$-en-US]yyyymmdd"))
           )
        ),
    Navigate(DailyInspectionScreen,ScreenTransition.Fade),         /* <-- If the user has submitted Weekly Inspection, navigate to Daily Inspection Screen */
    Navigate(WeeklyInspectionScreen,ScreenTransition.Fade)         /* <-- If the user has not submitted Weekly Inspection, navigate to Weekly Inspection Screen */
)

Note: The DailyInspectionScreen contains your Daily Inspection form, the WeeklyInspectionScreen contains your Weekly Inspection form.

Set the OnVisible property of the WeeklyInspectionScreen to following formula:

Notify("It is time for you to submit your Weekly Inspection for current week!", NotificationType.Information)

More details about LookUp function and Notify function, please check the following article:

LookUp function

Notify function

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Possibility of triggers and prompts in PowerApps

Hi @J_Hazel,

Do you create a separated "Weekly Inspection" SP list and "Daily Inspection" SP list to store the Inspection records on your side?

The triggers are not supported within PowerApps currently, if you want to add a trigger or flow into your app to alert the user to make a certain selection, I afraid that there is no way to achieve your needs.

As an alternative solution, you could consider detect if there is already one record submitted for current week within the "Weekly Inspection" SP list, if yes, navigate the user to the "Daily Inspection" form to do a simple "Daily Inspection", if no, naviate the user to the "Weekly Inspection" form and prompt him that it was time to complete this.

I have made a test on my side, please take a try with the following workaround:7.JPG

Set the OnStart property of the first screen of your app to following:

If(
    !IsBlank(
        LookUp(                         /* Check if there is already one record submitted for current week within your "Weekly Inspection" SP list */
             'YourWeekLyInspectionList', 
             Value(Text(Created,"[$-en-US]yyyymmdd")) >= Value(Text(DateAdd(Now(),-Weekday(Today())+1),"[$-en-US]yyyymmdd")) &&  
             Value(Text(Created,"[$-en-US]yyyymmdd")) <= Value(Text(DateAdd(Now(),7-(Weekday(Today()))),"[$-en-US]yyyymmdd"))
           )
        ),
    Navigate(DailyInspectionScreen,ScreenTransition.Fade),         /* <-- If the user has submitted Weekly Inspection, navigate to Daily Inspection Screen */
    Navigate(WeeklyInspectionScreen,ScreenTransition.Fade)         /* <-- If the user has not submitted Weekly Inspection, navigate to Weekly Inspection Screen */
)

Note: The DailyInspectionScreen contains your Daily Inspection form, the WeeklyInspectionScreen contains your Weekly Inspection form.

Set the OnVisible property of the WeeklyInspectionScreen to following formula:

Notify("It is time for you to submit your Weekly Inspection for current week!", NotificationType.Information)

More details about LookUp function and Notify function, please check the following article:

LookUp function

Notify function

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,010)