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

Re: Adding and displaying multiple comments for same customer with a date and time stamp

Sure!

The two tables I am using:

- Primary datasource name: Contacts (Organization field is a single-line)

- Database to store notes: Notes (Organization is a LookUp field to Contacts database)

 

Scenario - 

1. Main Screen = Has a form that populates based on a dropdown box (dropdown box filters on Organization field in Contacts datasource)

2. On the Main Screen, I have a Navigate button to View/Add Notes for this Organization, which takes users to a new screen (Notes Screen)

 

Notes Screen -

1. This is where I would like people to view any notes related to the Organization that was filtered from the selection on the Main Screen 

2. I would also like to add a button for people to add a new note, including time/date stamp, for this Organization. It would include a submit new note button. Once the submit button is clicked, the new note will be added to the view notes area.

 

Any help would be much appreciated!

 

I

Highlighted
Super User III
Super User III

Re: Adding and displaying multiple comments for same customer with a date and time stamp

@ttaylor 

Well, since you are using a dropdown you could just add this to the Items property of your Notes gallery.  Replace Dropdown1 with your own datasource name.  I assume Organizations, Notes and Contacts are all Sharepoint lists.

 

Filter(Notes,Dropdown1.SelectedText.Value=OrganizationID.Value

 

Every Sharepoint table has a column named Modified.  Add it as a label to your Gallery to see the date/timestamp.

 

To add a new notes entry make sure the form is in New mode when the user navigates to the screen

 

NewForm(your_notes_form_name);Navigate(your_notes_screen_name);

Then put the following code in your Submit button OnSelect property.  Refresh will update the galleryNotes.

 

Submit(your_notes_form_name);Refresh(your_notes_datasource_name);

 

Highlighted
Helper III
Helper III

Re: Adding and displaying multiple comments for same customer with a date and time stamp

So I have a dropdown (DropDown1) where users select the Organization and it populates a form (Form1) on the Main Screen. It has alot of information for them to see so I will need to navigate to a new screen in order to view the notes.

 

What would my navigation button look like since I just need a new screen to view/add/edit notes based on the information showing in Form1? (Form1 data is populated based on the selection in DropDown1)

Highlighted
Super User III
Super User III

Re: Adding and displaying multiple comments for same customer with a date and time stamp

@ttaylor 

I would favor a 3 screen model to keep things simple:

 

Screen#1 MainScreen

You've already built this.  Add a button having the OnSelect property

 

Navigate(NotesListScreen);

 

Screen#2 NotesListScreen

You've already built this.  It's just a gallery containing all of the Notes for an organization.  Change the OnSelect property of the gallery to the following.  This will bring the user to the edit details page of the app.

 

EditForm(NotesDetailScreen);Navigate(NotesDetailScreen);

Then make a button that says add new entry with the following code.

 

NewForm(NotesDetailScreen);Navigate(NotesDetailScreen);

Screen#3 NotesDetailScreen

This is nothing more than a form control connected to your datasource.  You can add a button to submit based on my previous instructions.

 

 

 

Highlighted
Helper III
Helper III

Re: Adding and displaying multiple comments for same customer with a date and time stamp

Thank you! I'll give this a try and let you know. I thought I needed a Patch function to add a new note as a row in my table.

Highlighted
Super User III
Super User III

Re: Adding and displaying multiple comments for same customer with a date and time stamp

@ttaylor 

Patch is one way to add/update records to a datasource.  But its always the 2nd option if you can't submit via a New/Edit form.

Highlighted
Helper III
Helper III

Re: Adding and displaying multiple comments for same customer with a date and time stamp

I REALLY, REALLY want your suggestion to work. 🙂

 

I've attached a picture with notes because I've tried a few different ways and I can't get the gallerynotes to work.

Highlighted
Super User III
Super User III

Re: Adding and displaying multiple comments for same customer with a date and time stamp

@ttaylor 

That picture really helps.  I assumed the dropdown held a Company ID number.  Now I can see it holds text instead.

 

I am going to show you step-by-step how I built an app to do the same thing on my side.

 

 

Step #1  Create the Contacts List in Sharepoint.  Both columns are single line text.  (I hide the title column and made it not required).

 

img1.png

 

Step #2 Build the Notes List.  Both columns are single line text. (I hide the title column and made it not required).

 

img2.png

 

Step #3 Create a new PowerApp

 

Step #4  Establish the connection to the Contacts and Notes lists

 

img3.png

 

Step #5: Create the Main Screen.  Add a DropDown control (Dropdown2).  Write the following code in the Item property of the Dropdown

 

img4.png

 

Step#6 Create another screen called NotesScreen.  Add a vertical gallery (Gallery1).

 

img5.png

 

Step #7:  Select Notes as the Datasource.

 

img6.png

 

Step 8#  On the right-side menu change the layout to Title, Subtitle and Body

 

img7.png

 

Step #9  On the right side menu click Edit Fields and change to the following

 

img8.png

 

Step #10  Change the Items property of the gallery to the following.

 

img9.png

 

Step #11  Toggle between screens.  Change the dropdown on the MainScreen to change the gallery on the NotesScreen.

 

Step #12  CELEBRATE!

 

 

Suggest you this example and apply what your learned to your app.  I think reason we were having problems with Step #10 is because I assumed your Organization ID was a both a LookUp column and a number.  Neither appears to be true.

 

 

I will be away from a PC for a few days so hopefully my short tutorial helped.  If you still have issues, I suggest making a new forum post with that wonder screenshot you took.  That picture really helped my understanding of your case.

 

---

Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly.  If your thought the post was helpful please give it a "Thumbs Up."

 

 

Highlighted
Helper III
Helper III

Re: Adding and displaying multiple comments for same customer with a date and time stamp

I haven't had any luck. I've attached another screen capture that I hope will make more sense. My Notes list is a LookUP field. 

 

Thank you SO MUCH for all your help. You've been wonderful!!

Highlighted
Super User III
Super User III

Re: Adding and displaying multiple comments for same customer with a date and time stamp

@ttaylor 

Just wanted to ask, did you attempt the small tutorial I laid out for you in a previous post?  I am curious if you had success with that and what is different from your app.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

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