cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FlintWestwood
Frequent Visitor

Update three lists with one Button

Hi,

 

I want to update three lists on one SharePoint with a click of a button and a Dropdown choice.

List 1: A, B, C with Dates

List 2: A, B,C with Number Values

List 3: Date1, Date2 with Dates

 

How I want it to work

Dropdown with three choices: A, B, C

Button: GO

 

Set Value in List 1 of choosen item to Today

Set Value in List 2 of choosen item to +1

Set Value in List 3 of Date 2 to Today

 

Questions:

How can I set the values of the cells via PowerApp?

How do I lookup the rows of the selected values by the Dropdown-Menu?

 

Thank you very much for your help

 

Best Regards

Flint

1 ACCEPTED SOLUTION

Accepted Solutions

I solved the Problem myself. Code for the Button is as followed:

 

Patch( 'List 1'; First( Filter( 'List 1'; Title = Dropdown1.SelectedText.Title ) ); { Date:Today()});;

Patch( 'List 2'; First( Filter( 'List 2'; Title = Dropdown1.SelectedText.Title ) ); {Value:Dropdown1.Selected.Value+1});;
Patch( 'List 3'; First( Filter( 'List 3'; Title = "Date 2" ) ); { Date:Today()})

View solution in original post

4 REPLIES 4
WarrenBelz
Super User III
Super User III

Hi @FlintWestwood ,

Firstly, you mentioned a Lookup - I assume that choosing A/B/C is from a list that also has other fields you want to reference. One of these I suspect is the number you want to increment.

Can you please clarify this and also what is the Items property of your dropdown?

 

Hi @WarrenBelz 

the Dropdown is populated by the first column of either List 1 or List 2. Both columns have the same rowcount and same values in the same order and the values are unique. No repeating of A or B or C.

 

Example:

  • Dropdown is set to B by User
  • User presses Button

All the following steps should be done by the App:

  1. The App sets in List 1 the Date in the row with B to Today
  2. The App increments in List 2 the Value in the row with B by 1
  3. The App sets in List 3 the Date in the row "Date 2" to Today

 

I solved the Problem myself. Code for the Button is as followed:

 

Patch( 'List 1'; First( Filter( 'List 1'; Title = Dropdown1.SelectedText.Title ) ); { Date:Today()});;

Patch( 'List 2'; First( Filter( 'List 2'; Title = Dropdown1.SelectedText.Title ) ); {Value:Dropdown1.Selected.Value+1});;
Patch( 'List 3'; First( Filter( 'List 3'; Title = "Date 2" ) ); { Date:Today()})

View solution in original post

That's good @FlintWestwood ,

I am in a different timezone (6:15 am Thursday morning here)

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,350)