cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jese
Level: Powered On

Power Apps Formula For All Update Question

How can I create a formula to update each row in my table based on checking whether the value exists in another table?

 

UpdateIf(SecureTable,!IsBlank( LookUp(
ADShort, SecurityLevel in ADShort.SecurityLevel
) ) && !IsBlank( LookUp( ADShort, LevelName in ADShort.LevelName
)),{Allowed:"Yes"});

So what I want to achieve above is, to Change my 'SecureTable' to have the column allowed as 'Yes'

Only for those values which exist in my ADShort Table where my ADshort table is basically a method to implenent security on my collection records

 

Hope this makes sense, can anyone help as I am very stuck.

I am essentially trying to do a ForALL, looping update if statement.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Power Apps Formula For All Update Question

Hi @Jese ,

Do you want to update multiple records in your SecureTable based on checking whether the SecurityLevel column value is in ADShort table, and the LevelName column value is in ADShort table?

 

Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:

Please modify your formula as below:

 

UpdateIf(
SecureTable,
!IsBlank(LookUp(ADShort, SecurityLevel = SecureTable[@SecurityLevel] && LevelName = SecureTable[@LevelName])),
{
Allowed:"Yes"
}
)

Or

 

UpdateIf(
         SecureTable,
         SecurityLevel in SecureTable.SecurityLevel && LevelName in SecureTable.LevelName,
         {
           Allowed:"Yes"
         }
)

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Dual Super User
Dual Super User

Re: Power Apps Formula For All Update Question

Hi @Jese 

 

where is your question?

Super User
Super User

Re: Power Apps Formula For All Update Question

Hi @Jese 

Is there anything specific that you want to know about the ForAll and Update functions?

Jese
Level: Powered On

Re: Power Apps Formula For All Update Question

How can I create a formula to update each row in my table based on checking whether the value exists in another table?

 

UpdateIf(SecureTable,!IsBlank( LookUp(
ADShort, SecurityLevel in ADShort.SecurityLevel
) ) && !IsBlank( LookUp( ADShort, LevelName in ADShort.LevelName
)),{Allowed:"Yes"});

So what I want to achieve above is, to Change my 'SecureTable' to have the column allowed as 'Yes'

Only for those values which exist in my ADShort Table where my ADshort table is basically a method to implenent security on my collection records

 

Hope this makes sense, can anyone help as I am very stuck.

I am essentially trying to do a ForALL, looping update if statement.


@RezaDorrani wrote:

Hi @Jese 

 

where is your question?


 

Jese
Level: Powered On

Re: Power Apps Formula For All Update Question

How can I create a formula to update each row in my table based on checking whether the value exists in another table?

 

UpdateIf(SecureTable,!IsBlank( LookUp(
ADShort, SecurityLevel in ADShort.SecurityLevel
) ) && !IsBlank( LookUp( ADShort, LevelName in ADShort.LevelName
)),{Allowed:"Yes"});

So what I want to achieve above is, to Change my 'SecureTable' to have the column allowed as 'Yes'

Only for those values which exist in my ADShort Table where my ADshort table is basically a method to implenent security on my collection records

 

Hope this makes sense, can anyone help as I am very stuck.

I am essentially trying to do a ForALL, looping update if statement.

Community Support Team
Community Support Team

Re: Power Apps Formula For All Update Question

Hi @Jese ,

Do you want to update multiple records in your SecureTable based on checking whether the SecurityLevel column value is in ADShort table, and the LevelName column value is in ADShort table?

 

Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please take a try with the following workaround:

Please modify your formula as below:

 

UpdateIf(
SecureTable,
!IsBlank(LookUp(ADShort, SecurityLevel = SecureTable[@SecurityLevel] && LevelName = SecureTable[@LevelName])),
{
Allowed:"Yes"
}
)

Or

 

UpdateIf(
         SecureTable,
         SecurityLevel in SecureTable.SecurityLevel && LevelName in SecureTable.LevelName,
         {
           Allowed:"Yes"
         }
)

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

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,704)