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