Solved! Go to Solution.
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."
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?
@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 🙂
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.
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."
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.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
204 | |
182 | |
72 | |
44 | |
35 |
User | Count |
---|---|
331 | |
267 | |
116 | |
70 | |
67 |