cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Nested ForAll() column identificiation

Hi all,

 

I have the following statement:

ForAll(
    [OPTIONS]',
    ForAll(
        Filter(
           [ANSWERS],
            state = 0
        ),
        Patch(
            [DETAILS],
            Defaults([DETAILS]),
            {
                OPTION: ID,
                ANSWERS: #####
            }
        )
    )
);

I'm trying to call the value from [OPTIONS] to populate the #####. It seems that the ForAll() function only pulls fields from [ANSWERS].

 

Any ideas?

J

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Nested ForAll() column identificiation

Hi @opticshrew2 ,

Do you want to reference the values from the '[OPTIONS]' data source within your nested Patch function?

 

If you want to reference the values from the '[OPTIONS]' data source within your nested Patch function, I think the Disambiguation operator (@) could achieve your needs.

 

I have made a test on my side, please consider modify your formula as below:

ForAll(
       [OPTIONS],
       ForAll(
             Filter(
                    [ANSWERS],
                    state = 0
                   ),
             Patch(
                   [DETAILS],
                   Defaults([DETAILS]),
                   {
                    OPTION: ID,
                    ANSWERS: [OPTIONS][@ColumnName]      /* <-- Modify your formula here */
                   }
             )
        )
)

Note: I assume that the [OPTIONS] represents your data source. The ColumnName represents the column in your [OPTIONS], which you want to populate for the ANSWERS column.

 

More details about the Disambiguation operator (@) in PowerApps, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/operators#disambiguation-oper...

 

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

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Nested ForAll() column identificiation

Hi @opticshrew2 ,

Do you want to reference the values from the '[OPTIONS]' data source within your nested Patch function?

 

If you want to reference the values from the '[OPTIONS]' data source within your nested Patch function, I think the Disambiguation operator (@) could achieve your needs.

 

I have made a test on my side, please consider modify your formula as below:

ForAll(
       [OPTIONS],
       ForAll(
             Filter(
                    [ANSWERS],
                    state = 0
                   ),
             Patch(
                   [DETAILS],
                   Defaults([DETAILS]),
                   {
                    OPTION: ID,
                    ANSWERS: [OPTIONS][@ColumnName]      /* <-- Modify your formula here */
                   }
             )
        )
)

Note: I assume that the [OPTIONS] represents your data source. The ColumnName represents the column in your [OPTIONS], which you want to populate for the ANSWERS column.

 

More details about the Disambiguation operator (@) in PowerApps, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/operators#disambiguation-oper...

 

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

Community Champion
Community Champion

Re: Nested ForAll() column identificiation

Thanks for posting in the community @opticshrew2 - can you review the above reply and update the thread if it was helpful?

 

Thank you,

 

@TopShelf-MSFT 

Helpful resources

Announcements
secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,173)