Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Calculating number of items and increase value in another list

(0) ShareShare
ReportReport
Posted on by 2

Hello, team.

 

I have two lists in sharepoint, in one of them people are booking accomodations, but accomodation can contain few peoples and I should get possibility to choose only frees accomodation.

So, as I understand, I should create a lookup column that will be see a date for each column from now to now+1 month and added 1 to column with TotalPeople@Accomodation. After that Power Apps can show in dropdown list accomodations with TotalPeople<MaxPeople only.

That's right? If it is, can I do that in Flow, or I can use some sharepoint instruments?

  • Genny Profile Picture
    Genny 2 on at
    Re: Calculating number of items and increase value in another list

    So,

     

    I have one list, that contain next columns:

    Created By

    Date of Arrival

    Date of Departure

    City of Arrival

    Accomodation for booking

     

    Another list contains:

    City

    Staff

    Current number of people at accomodation

    Maximum allowed people at accomodation

     

    What I want to do:

    When someone create an Item in first list, in dropdown list them can see only Accomodations that can satisfy two conditions:

    1. Accomodation are belong to city that was choosed in previous dropdown list in same form.

    2. Accomodation are have at least one free place (that mean current number of people for all dates between date of arrival and date of departure less than maximum allowed number of people for that accomodation).

     

    So, looks a bit complicated, but I think I can explain all what I want.

    Of course, that feature should work continiously, updating one time in a day or when anybody adding/deleting item.

    I found something similar in powerapps theme (https://powerusers.microsoft.com/t5/General-Discussion/Check-Date-Availability-for-a-Sharepoint-item-and-then-change/m-p/42729#M17710), and for now looking for most optimum solution.

  • v-yamao-msft Profile Picture
    v-yamao-msft on at
    Re: Calculating number of items and increase value in another list

    Hi @Genny,

     

    Could you share more details on the two lists?

    To calculate number of items in a list, we could use function length to return the number of items in a collection.

    A simple flow for your reference:

    1.PNG

     

    Best regards,

    Mabel

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard