Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Check SharePoint list column value before submitting data

(0) ShareShare
ReportReport
Posted on by 446

I am trying to check a SharePoint list column value before having data be submitted. The column is a simple Number field that will be counting down to 0 as users submit data.

 

To elaborate: It's essentially an appointment booking system that doesn't use forms in any way - just text inputs and gallery selections. I'm having a difficult time trying to account for not having the data in "real time" where two users could essentially select an appointment that only has 1 slot remaining and double book it. I know this can be accomplished with a simple refresh timer, but that has it's own problems with performance and doesn't really look great with the constant loading dots at the top of the screen.

 

All I'm trying to accomplish is to have a "loading spinner" type deal that triggers on screen for the user, goes and checks this column called "Slot Count", and if the value is not 0 to submit the data. If the value is 0 I want it to stop, inform the user that the appointment is full, and allow them to select another one. I tried to use LookUp with IsBlank but either I'm not doing it correctly or it won't work for this scenario.

 

List information:

"Vaccine Appointments" with two columns - "Time" and "Slot Count"

 

Relevant Screens:

"Appointment Selection" with a gallery pulling from the above SharePoint list. Has a button under each time slot to select the appointment and go to the next screen called "Appointment Confirmation."

"Appointment Confirmation" with labels displaying appointment information and a confirm button to then do the check and submit the data as long as the slot count isn't 0. If the slot count is 0, it'll inform the user with a popup and once they select OK it'll return to the "Appointment Selection" screen.

 

Thanks!

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Check SharePoint list column value before submitting data

    @Ryan_B 

    Yes, the Lookup function will return whatever is in the 3rd argument if it is able to find a record matching your criteria.  So, the simple trick here is...put a true in the 3rd argument.  If the record is found then Lookup will return true, otherwise false.

  • Ryan_B Profile Picture
    446 on at
    Re: Check SharePoint list column value before submitting data

    Looks like I was pretty close to this already! I guess I didn't need the IsBlank portion and I didn't really understand what the result part of the LookUp function was. This worked perfectly, thank you!

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Check SharePoint list column value before submitting data

    @Ryan_B 

    If other users are impacting the same record in the list, then you will need to refresh the datasource before submitting.  Even then you are not guaranteed that it will be correct (i.e. another user could be decrementing the number to 0 immediately after you refresh the data).

     

    You can, however, check on the value being 0 or not with a simple lookup.

       LookUp(yourList, <otherCriteria> && NumberColumn=0, true)

    This will return a true if that condition is met.

     

    I hope this is helpful for you.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard