cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Emailing data and answers from a gallery

Hey guys, if anyone could help me with this I would thank you a lot! I'm pretty sure this shouldn't be too hard but i have searched and searched and for some reasons the answers that i find do not work for me... So, I have a gallery with some questions that are taken from a list on an excel file. I also added a radio button that says yes no or NA and a text input. I want to be able to save the question and the respective answers from the user to send it in an email or to a sharepoint.

Basically I want to have Question: blabla then answer: blablabla 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Emailing data and answers from a gallery

@jgutierrez79 

Add the Office365Outlook connector then put this code in the OnSelect property of a button.

 

Office365Outlook("johndoe@yourcompany.com","Subject Line", Concat(Gallery1.AllItems, Label_Question.Text&": "&Radio_Answer.Value&"<br>"))

 

When a button is clicked an email will be sent with the gallery contents.  The data will not be stored anywhere.  That’s a different question that can be resolved later

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

10 REPLIES 10
Highlighted
Super User
Super User

Re: Emailing data and answers from a gallery

@jgutierrez79 

Like this...

Concat(Gallery1.AllItems, Label_Question.Text&": "&Radio_Answer.Value&"<br>")

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Helper I
Helper I

Re: Emailing data and answers from a gallery

Sorry to bother you I'm really new to this, afer I do that how could I email it? like where will the data get stored? I want to be able to email that, thank you again!

Highlighted
Helper V
Helper V

Re: Emailing data and answers from a gallery

You could add the answers to a collection which you then patch when the user submits.

 

For example...

 

OnSelect of radio button

UpdateIf(
    colAnswers,
    ID = ThisItem.ID,
    {FieldValue: RadioYesNo.Selected.Value}
);

 

OnChange Text Box

UpdateIf(
    colAnswers,
    ID = ThisItem.ID,
    {FieldValue: TextInput1.Text}
);

 

OnSubmit button

 

ForAll(
        colAnswers,
        Patch(
            'YourSPList',
            Defaults('YourSPList'),
            {      
                ID: yourID,
                Title: yourTitle
                FieldValue: 'Field Value',   
            }
        )
 )

 

Highlighted
Helper I
Helper I

Re: Emailing data and answers from a gallery

I'm getting and error when trying that because it says the function update if has some invalid arguments, I'm pretty sure it's a stupid mistake from my side, I don't know exactly what I should change to make it work any intel on that? 

 

Attached is an image with the names that I used for the radio button and text input. Thank you so much for your help

Highlighted
Helper I
Helper I

Re: Emailing data and answers from a gallery

Oh I think it's because the colAnswers part should be a data source? Sorry, I'm indeed really new to this.

Highlighted
Super User
Super User

Re: Emailing data and answers from a gallery

@jgutierrez79 

Add the Office365Outlook connector then put this code in the OnSelect property of a button.

 

Office365Outlook("johndoe@yourcompany.com","Subject Line", Concat(Gallery1.AllItems, Label_Question.Text&": "&Radio_Answer.Value&"<br>"))

 

When a button is clicked an email will be sent with the gallery contents.  The data will not be stored anywhere.  That’s a different question that can be resolved later

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted
Helper I
Helper I

Re: Emailing data and answers from a gallery

This definitely worked, I still need to fix a few details but this was perfect! Thank you so much!!!! Seriously, you saved me!

Highlighted
Super User
Super User

Re: Emailing data and answers from a gallery

@jgutierrez79 

Glad to hear it.  Best of luck building your app!

 

If you need more help with storing the data please start a new thread and tag me in it.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Helper I
Helper I

Re: Emailing data and answers from a gallery

Sorry, now that I think about it I might need to send data from different galleries, should I do another post for that? Thanks for all your help so far!

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

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 (6,726)