cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Navigation Tracking

Hello all,

Advice please.

I have created an audit app with a list of questions, let's say 10. For each question, if the user answers 'No' they are presented with some follow on questions, i.e. what action are you taking, comment box. I would also like them to have the option of taking a picture. This is where my question comes from, if I had one screen with a picture capture function, how would I navigate to that screen, take the picture and then that picture be assigned to the question they came from?

 

Or based on this scenario, would there be a better way of doing it? open to suggestions

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Navigation Tracking

Thanks for your response 

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Navigation Tracking

Hi @Chris-Dale ,

Could you please share a bit more about your scenario?

Could you please show more details about the Picture Capture function that you mentioned? How do you achieve it? Using Add picture control?

 

If you want to navigate to the question screen, please use the following formula (set the OnSelect property of the "Navigate" icon to following😞

Navigate(TargetScreen1, ScreenTransition.None)

 

On your side, you could consider save the taken picture along with the corresponding question name into a Collection. I have made a test on my side, please take a try with the following workaround:

1. Within the question screen, you could list the available answers for each question using Radio control (Radio1). Add a Comment box (Text Input box) or a "Add Picture" control within the question screen.

2. Set the Visible property of the Comment box or "Add picture" control to following:

If(Radio1.Selected.Value = "No", true, false)

3. Set the OnSelect property of the "Navigate" icon to following:

If(                                   /* <-- Collect the answer for each question into a Collection, and navigate to next question screen  */
   Radio1.Selected.Value = "No",
   Collect(                                     /* <-- Store answer for each question into a Collecton along with the corresponding question name */
               AnswersCollection,
               {
                 QuestionName: "The current question name",
                 Answer: Radio1.Selected.Value,
                 TakenPic: AddMediaButton1.Media,   /* <-- If you use Camera control to capture pic, please type Camera1.Photo formula here */
Comment: CommentBox.Text } ), Collect( AnswersCollection, { QuestionName: "The current question name", Answer: Radio1.Selected.Value } ) );
Navigate(NextQuestionScreen, ScreenTransition.None) /* <-- Navigate to next question screen */

4. Within the last question screen in your app, if you want to save the selected answer for each question into your data source, you could consider save the whole collection data into your data source using the following formula:

ForAll(
          AnswersCollection,
          Patch(
                    'YourDataSource',
                    Defaults('YourDataSource'),
                    {
                      QuestionColumn: AnswersCollection[@QuestionName],
AnswerColumn: AnswersCollection[@Answer],
PicColumn: AnswersCollection[@TakenPic],
CommentColumn: AnswersCollection[@Comment] } ) )

Note: The QuestionColumn, AnswerColumn, PicColumn,... represents the columns in your data sources.

 

More details about the ForAll function and Patch function, please check the following article;

ForAll function, Patch function

 

Best regards,

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.
Highlighted
Frequent Visitor

Re: Navigation Tracking

Thanks for your response 

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,166)