Power Apps Exchange

Please login or click SIGN UP FOR FREE to create your PowerAppsUG account to join this user group.
 View Only

Easy way for Updating repeating tables

  • 1.  Easy way for Updating repeating tables

    Posted Dec 02, 2021 07:54 AM

    Hi,

    in many cases, i need repeating tables in my apps because has parts of multiple items per request. I am storing these data in sharepoint lists.

    Example:
    1 request item --> Request List
    x sub items --> Sub Item List, refering to the request item ID

    Collecting and submitting these data is easy.
    If its a new item, its collecting new items in a gallery with input fields. --> With submitting its patching new items via "ForAll" of the collection
    When opening the item afterwards, i am collection the items from the sharepoint list (via request ID) instead of collecting new items.
    But updating this data is partly complicated now, because there different types of updates that could happen
    - Adding additional line items
    - Deleting line items
    - Updating existing line items

    Is there an easy way to update these cases? There are some ideas, but all of them are complicated or bring other issues. In some of my cases i have more than 1 repating table or even nested tables.

    Options:
    - When updating, delete all sub items and create them new --> i will lose the version history
    - Directly update the sharepoint items via OnChange --> User has no option to save the changes manually with a submit button
    - Collecting changes in multiple collections (e.g. colItemsToUpdate, colItemsToAdd, colItemsToDelete) --> Many collections and complex to build

    Do you have any easier idea?

    ------------------------------
    Fabian Heil
    ------------------------------