cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GauravG
Continued Contributor
Continued Contributor

ForAll function has invalid arguments

Hi All,

Can someone please suggest- what looks wrong here in the formula? It shows ForAll function is invalid

GauravG_0-1611827470028.png

I used a similar function for the Audience field shown on left- it worked there but doesn't seem to be working for the field 'SF Reporting Role Group'. Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
GauravG
Continued Contributor
Continued Contributor

@timl It's resolved- thanks for trying to help!

The formula is right- the field was named differently in different places- just corrected that and it works now!

View solution in original post

3 REPLIES 3
timl
Super User III
Super User III

Hi @GauravG 


I'm not sure what the cause of this problem is.

On the basis that you want to rename the 'value' column from 'SF Reporting Role Group' to 'Result', another way that you could do this would be to call the RenameColumns function.

This works more efficiently than ForAll, and it may help you to remove this error.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-table-shaping

 

 

 

GauravG
Continued Contributor
Continued Contributor

@timl I do not want to rename the column- i was just trying to follow what i had in another column named "Audience" for which the same thing worked. This was suggested to me by someone earlier.

These 2 columns "Audience" & "SF Reporting Role Group" are of same type- Choice type, they both allow multiple selection, they both are coming from another SharePoint list as distinct values and are both used later to cascade relevant dropdown values to their sub-level field adjacent to them:

  • Sub-Audience for Audience &
  • SF Reporting Role for SF Reporting Role Group

Please note that the formula highlighted says "Cannot use Min values in this context" and that's why ForAll has invalid arguments. 

I have tried pasting the formula commented in green to show a similar ForAll functionality in use which works for that. Thanks!

GauravG_0-1611834423896.png

 

GauravG
Continued Contributor
Continued Contributor

@timl It's resolved- thanks for trying to help!

The formula is right- the field was named differently in different places- just corrected that and it works now!

View solution in original post

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 is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (50,163)