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
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,883)