web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Adding and displaying ...
Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have two Sharepoint lists - one name Contacts, the other named Notes.

 

When a rep visits a customer, I want them to be able to see notes from a previous visit (View) and then add a new note for this visit (basically appending rows in the Notes list). 

 

I've tried several scenarios and can't seem to find the best solution.

 

Any ideas?

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @ttaylor 

    Here's one way you could do it:

     

    • Create a gallery containing contacts (galleryContacts)
    • Set the Items property of galleryContacts to the Contacts datasource
    • Create a gallery containing Notes (galleryNotes)
    • Set the Items property of galleryNotes to Filter(notes_sharepoint_list_datasource, galleryContacts.Selected.ID = ContactID)
    • (ContactID would be a column in your Notes datasource containing the unique ID number of the contact)
    • Now when the user clicks on a contact name it will display the contact's notes
    • Add a form (frm_addNote) in the state FormMode.New. Include any fields you require.
    • Add a submit button and use the following code:  Submit(frm_addNote); Refresh(your_notes_datasource_name_here).
    • Now when the user clicks Refresh the note will be submitted and the Gallery will be refreshed, showing the most recent note

     

    That's my take on a general approach to the app design.

     

    ---

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

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hmmm...I'm getting an Invalid Argument Type on GalleryNotes when I type in the filter info you provided. 

     

    I used the Organization field in my contacts gallery (GalleryContacts). They all show up.

     

    Added the a new gallery for notes (GalleryNotes) and typed

         Filter(GalleryNotes, GalleryContacts.Selected.ID = ID).

     

    Since the rep might be visiting a different person in the organization each time, I want the notes to be tied to the organization.

     

    I hope that makes sense. 🙂

  • mdevaney Profile Picture
    29,993 Moderator on at

    @ttaylor 

    The reason you are seeing an Invalid Argument Type is because ID has to exist in the contacts gallery.  I did not explictily say this earlier so I can understand your confusion.

     

    However, from reading your post I can tell you want Notes to be tied to the organization instead.  I'd make the following changes:

     

    • Create a gallery containing contacts (galleryContacts)
    • Set the Items property of galleryContacts to the Contacts datasource
    • Create a gallery containing Notes (galleryNotes)
    • Set the Items property of galleryNotes to Filter(notes_sharepoint_list_datasource, galleryContacts.Selected.OrganizationID = OrganizationID)
    • (OrganizationID would be a column in your Contacts datasource containing the unique ID of the organization (i.e. vendor code)
    • (OrganizationID would ALSO be a column in your Notes datasource containing the unique ID of the organization (i.e. vendor code)
    • Now when the user clicks on a contact name it will display the contact's notes
    • Add a form (frm_addNote) in the state FormMode.New. Include any fields you require.
    • Add a submit button and use the following code:  Submit(frm_addNote); Refresh(your_notes_datasource_name_here).
    • Now when the user clicks Refresh the note will be submitted and the Gallery will be refreshed, showing the most recent note

     

    Let me know if this helps!

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I used a LookUp on Organization in my Notes list to get that info from my Contacts list. 

  • mdevaney Profile Picture
    29,993 Moderator on at

    @ttaylor 

    Is your datasource a Sharepoint list?  LookUp columns are considered to be a complex column type containing both an ID and a Value.  You probably want the value.  Here's how to do it by changing my code above.

     

    Filter(notes_sharepoint_list_datasource, galleryContacts.Selected.OrganizationID = OrganizationID.value)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It is a SharePoint List. I used this Filter:

     

         Filter(GalleryNotes, GalleryContacts.Selected.OrganizationID = OrganizationID.Value)

     

    and I'm still getting an invalid argument on my GalleryNotes table. 

     

    From what I understand, by using a LookUp I don't need a unique Identifier in my tables, correct?

     

    You have been so kind in helping me. I really appreciate it!

  • mdevaney Profile Picture
    29,993 Moderator on at

    @ttaylor 

    Maybe, its because we should change the Items property of the GalleryNotes to reference the SP List datasouce instead of a gallery:

     

    Filter(notes_sharepoint_list_datasourceGalleryContacts.Selected.OrganizationID = OrganizationID.Value)

     

     

    No problem.  We'll keep on plugging away at this.  I feel like the solution is within reach!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Sorry...no luck. Doesn't seem to like the OrganizationID:

     

    Filter(Notes, GalleryOrgs.Selected.OrganizationID = OrganizationID.Value)

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @ttaylor 

     

    Can you share more details about the schema of both the sharepoint list and their relationship?
     
    You can use either Edit Form to update an existing record or create individual controls. If you can share more information about the requirements, then I might be able to help you with formula building.
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard