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

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

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

Highlighted
Anonymous
Not applicable

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

 

Thank you,

 

@Anonymous 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,672)