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.
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.
Administrator
Administrator

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
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 388 members 4,888 guests
Please welcome our newest community members: