Skip to content

Commit aaa6411

Browse files
authored
Merge pull request MicrosoftDocs#4592 from MicrosoftDocs/stjanovi-patch-11
Add FAQ on accessing form context
2 parents b1b0592 + 7f8112a commit aaa6411

File tree

1 file changed

+5
-1
lines changed
  • powerapps-docs/developer/component-framework

1 file changed

+5
-1
lines changed

powerapps-docs/developer/component-framework/faq.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
author: ghurlman
66
ms.service: powerapps
77
ms.search.keywords:
8-
ms.date: 12/10/2020
8+
ms.date: 06/03/2021
99
ms.author: grhurl
1010
ms.reviewer: nabuthuk
1111
title: Power Apps component framework FAQs
@@ -63,6 +63,10 @@ sections:
6363
- question: How to add commandbar, search to subgrids
6464
answer: |
6565
To add commandbar, search to a subgrid for model-driven apps, you need to specify the [cds-data-set-options](manifest-schema-reference/data-set.md).
66+
67+
- question: Can I access form context like I can in model-driven apps event handlers?
68+
answer: |
69+
Accessing form context directly in a control is not supported. Code components are expected to work across various products like model-driven apps, canvas apps, dashboards, and hence they cannot have dependency on the form context. A work around is to make the code component bound to a column and add an `OnChange` event handler to that column. The code component can update the column value, and the `OnChange` event handler can access the form context. Column not bound to a table could be used, or a column bound to a table with `submitMode` set to `never` can be used. We will add support for the custom events in future which can be used for communicating changes outside of a control without adding a column configuration.
6670
6771
additionalContent: |
6872
## See also

0 commit comments

Comments
 (0)