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

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
Community Support Team
Community Support Team

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
Community Support Team
Community Support Team

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

TopShelf-MSFT
Level 10

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
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,741)