Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 1R4Q1pa82EBLjVM4J8DWpv
Power Apps - Microsoft Dataverse
Answered

SharePoint (PowerApps Form) UpdateIf Function

Like (0) ShareShare
ReportReport
Posted on 13 Aug 2020 07:08:27 by 18

Hi Team,

 

I need help on below case. I have 2 list (Session details & Registration form list). In the form (Customized Form), I will fetch some details such as (Course Name, DateTime, Available Seats, ID) from List A (Session) via dropdown field. So user need to select which course first then DateTime will reflect at dropdown list based on the course name selected on above. After they select the DateTime, the Available Seats and ID will reflect at another dropdown and textbox (ID).

 

The function is when they select the particular course and time, it will check whether the available seats are still available or not, if still available, user can able to submit for the registration. After they submit, it required to update value as increment +1 at Current Reservation column at Session list.

 

The problem statement is If the Course C has 2 different date & time (5pm & 6pm), when I submit for 5pm, it successfully updating the Current Reservation +1 value. After that if I submit for 6pm for 1st attempt, it will still update at 5pm record instead of 6pm. But, for 2nd attempt and onwards, it will update correctly at 6pm. If I update again to 5pm, then it will update at 5pm record. Course C has 2 records and 5pm is 1st record and 6pm will be 2nd record.

 

Below will be the UpdateIf function code that I added at Submit button under OnSelect setting :

SubmitForm(SharePointForm1);

UpdateIf(
    Sessions,ID = Value(DataCardValue8.Text), {'Current Reservations':'Current Reservations' + 1});

**DataCardValue8 is Session ID Textbox field**

 

Kindly refer the attachment of the list view and form view

 

Let me know if you need further details.

 

Regards,

Baradt

  • Verified answer
    Baradt Profile Picture
    18 on 28 Aug 2020 at 00:46:59
    Re: SharePoint (PowerApps Form) UpdateIf Function

    Hi @Drrickryp ,

     

    Thank you for your response and noted on the forum difference. I have managed to resolve this issue by using Power Automate flow to update the values.

     

    Thanks.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 27 Aug 2020 at 15:04:46
    Re: SharePoint (PowerApps Form) UpdateIf Function

    Hi @Baradt 

    If you still haven't found an answer, you will more likely get results if you post your question in the Building Power Apps Forum.  This forum is for Common Data Service issues. 

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,769 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard

Featured topics

Loading started