cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rt_1
Level: Power Up

Multiple conditions met -> Update list

I'm trying to update a password field in a sharepoint list, via a powerapp, only if the content of three other fields are first met.

 

This is just a demo and does not require security, even though it is a password field.

 

This is my first spin around the block with Powerapps and I'm really struggling with the structure of formulas, despite reading the documentation and searching for examples.

 

I was hoping to put together a formula that takes multiple arguments (which UpdateIf does not appear to allow) and if all the conditions are met, update the password field in the sharepoint user list. 

 

Something like:

       UpdateIf(Students,wjtq = Student_Username_1.Text && wwgs = CampusID  && DatePicker1 = u11l, true, {pzjb})

 

The formula is a mess I know, but just trying to demonstrate what I'm after.

 

PW_Change.GIF

 

 

Sharepoint Students List:
FIELD   CODE
Username: wjtq
Password: pzjb
CampusID: wwgs
AdmitDate: u11l

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Any thoughts or suggestions would be greatly appreciated. 

3 REPLIES 3
Super User
Super User

Re: Update a sharepoint field via power apps when conditions are met

@rt_1

 

If I understand correct, you would want the user to firs put in the details - Usernaem, campus id and date admitted and only if the combination of these 3 is correct, then the user should be able to set a new password and login.

 

To achieve this, you could disable theNew Password and the Login button , if the other inputs don't match. So set the Display Mode of the Password text input box and the Login button to 

 

If( IsEmpty(Filter(Students,wjtq = Student_Username_1.Text, wwgs = CampusID,  u11l = DatePicker1.SelectedDate)),Disabled, Edit)

 

Just to confirm, are wjtq, wwgs and u11l the columnnames in the sharepoint list?


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User
Super User

Re: Update a sharepoint field via power apps when conditions are met

For the Login button OnSelect, you could add this code in the OnSelect property to update/patch the password

 

Patch(Students, Filter(Students,wjtq = Student_Username_1.Text, wwgs = CampusID,  u11l = DatePicker1.SelectedDate), {passwordcolumnname: PasswordInput.Text})


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

rt_1
Level: Power Up

Re: Update a sharepoint field via power apps when conditions are met

vivekb,

 

You are correct,  the user to firs put in the details - Usernaem, campus id and date admitted and only if the combination of these 3 is correct, then the user should be able to set a new password and login.

 

And to confirm, wjtq, wwgs and u11l the columnnames in the sharepoint list.

 

I will give it a try and let you know how it worked.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,114)