cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ruemctire
New Member

Galleries

Hi all I'm new to powerapps and was looking for some ideas and help, I'm looking to make a basic guides for a conversation. For example if I have all my journeys as columns (hello, how are you, how have you been) and in each item I put the the conversation (like hello my name is Eric, how are you doing today, how has your day been so far) how would I filter that via a gallery ie depending on the button you press shows you that journey,

Any help would be greatly appreciated.
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Galleries

@Ruemctire 

I will suggest an idea how to create the app you showed in the whiteboard drawing.  Your app had 2 panels: left panel (user journey summary) and right panel (user journey full detail).  My example will suggest how you can make the right panel for now.   Some of the concepts in my example such as Collections here are at more of a higher level than just beginner but my attitude has always been to dive right in and try to start to learning regardless of the skill level.  Hopefully you feel the same way.

 

Step#1:  Create two collections: conversationOptions to define the possible conversation journeys and and myConversation to hold the users selected journey.  Put this code in the OnVisible property of your screen.

ClearCollect(conversationOptions
{ID:1, Conversation:"How Are You?",ResponseID1:2,Response1:"Good",ResponseID2:3,Response2:"Bad"},
{ID:2, Conversation:"I'm glad to hear that. Can I help?",ResponseID1:4,ResponseText1:"Yes",ResponseID2:5,ResponseText2:"No"},
{ID:3, Conversation:"I'm sorry to hear that. Can I help?",ResponseID1:4,ResponseText1:"Yes",ResponseID2:5,ResponseText2: "No"},
{ID:4, Conversation:"Great. Lets get started",ResponseID1:Blank(),ResponseText1:Blank(),ResponseID2:Blank(),ResponseText2: Blank()},
{ID:5, Conversation:"OK. Goodbye",ResponseID1:2,ResponseText1:Blank(),ResponseID2:Blank(),ResponseText2:Blank()}
);
ClearCollect(myConversation,First(conversationOptions});

 

Step#2  Create a new Gallery with the Items property.  Choose the layout Title only then delete any labels or pictures showing by default.

myConversation

 

Step#3  Insert a new label into the Gallery with the following code in the Text property

ThisItem.Conversation

 

Step#4  Create a button for the 1st conversation option and place it in the Gallery

Text: ThisItem.ResponseText1
OnSelect: Collect(myConversation,LookUp(conversationOptions,ID=ThisItem.ResponseID1))
Visible: !IsBlank(ThisItem.ResponseText1)

 

Step#5  Create a button for the 2nd conversation option and place it in the Gallery

 

Text: ThisItem.ResponseText2
OnSelect: Collect(myConversation,LookUp(conversationOptions,ID=ThisItem.ResponseID2))
Visible: !IsBlank(ThisItem.ResponseText2)

 

 

Step#6  You are ready to try out the app.  Click the play button to test.

 

Step#7  If you are satisfied with the test results go back and add more options to the conversationOptions Collection to create more possible journeys.

 

---
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

5 REPLIES 5
Super User
Super User

Re: Galleries

@Ruemctire 

I would like to help but I am confused about how this app will work.  Rather than talk about the data structure can you please talk about how the person would use the app?  I understand the purpose is to create a basic conversation guide.  How should the app work?

Ruemctire
New Member

Re: Galleries

@mdevaney so first they would pick the journey (either 1 or 2) then they would click the part of the conversation they are starting at IE hell then the information from the row should appear. hope this helps 🙂

Super User
Super User

Re: Galleries

Hi @Ruemctire 

For a chat/conversation type app, you might want to investigate the use of Virtual Agents rather than PowerApps. This might be easier, and better suit your needs.

https://powervirtualagents.microsoft.com/en-us/ 

Highlighted
Super User
Super User

Re: Galleries

@Ruemctire 

I will suggest an idea how to create the app you showed in the whiteboard drawing.  Your app had 2 panels: left panel (user journey summary) and right panel (user journey full detail).  My example will suggest how you can make the right panel for now.   Some of the concepts in my example such as Collections here are at more of a higher level than just beginner but my attitude has always been to dive right in and try to start to learning regardless of the skill level.  Hopefully you feel the same way.

 

Step#1:  Create two collections: conversationOptions to define the possible conversation journeys and and myConversation to hold the users selected journey.  Put this code in the OnVisible property of your screen.

ClearCollect(conversationOptions
{ID:1, Conversation:"How Are You?",ResponseID1:2,Response1:"Good",ResponseID2:3,Response2:"Bad"},
{ID:2, Conversation:"I'm glad to hear that. Can I help?",ResponseID1:4,ResponseText1:"Yes",ResponseID2:5,ResponseText2:"No"},
{ID:3, Conversation:"I'm sorry to hear that. Can I help?",ResponseID1:4,ResponseText1:"Yes",ResponseID2:5,ResponseText2: "No"},
{ID:4, Conversation:"Great. Lets get started",ResponseID1:Blank(),ResponseText1:Blank(),ResponseID2:Blank(),ResponseText2: Blank()},
{ID:5, Conversation:"OK. Goodbye",ResponseID1:2,ResponseText1:Blank(),ResponseID2:Blank(),ResponseText2:Blank()}
);
ClearCollect(myConversation,First(conversationOptions});

 

Step#2  Create a new Gallery with the Items property.  Choose the layout Title only then delete any labels or pictures showing by default.

myConversation

 

Step#3  Insert a new label into the Gallery with the following code in the Text property

ThisItem.Conversation

 

Step#4  Create a button for the 1st conversation option and place it in the Gallery

Text: ThisItem.ResponseText1
OnSelect: Collect(myConversation,LookUp(conversationOptions,ID=ThisItem.ResponseID1))
Visible: !IsBlank(ThisItem.ResponseText1)

 

Step#5  Create a button for the 2nd conversation option and place it in the Gallery

 

Text: ThisItem.ResponseText2
OnSelect: Collect(myConversation,LookUp(conversationOptions,ID=ThisItem.ResponseID2))
Visible: !IsBlank(ThisItem.ResponseText2)

 

 

Step#6  You are ready to try out the app.  Click the play button to test.

 

Step#7  If you are satisfied with the test results go back and add more options to the conversationOptions Collection to create more possible journeys.

 

---
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

Super User
Super User

Re: Galleries

@Ruemctire 

I'm glad the solution worked for you.  It was interesting to think about an efficient way to accomplish your goal.  Best of luck on building your app.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,703)