cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Chris-Dale
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

Thanks for your response 

View solution in original post

2 REPLIES 2
v-xida-msft
Community Support
Community Support

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.

Thanks for your response 

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

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

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,392)