web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : RK6EOarkNR/cMwJ5UWrsCr
Power Apps - AI Builder
Unanswered

How to Update CDS Entity Record using Values from FormProcessor

Like (0) ShareShare
ReportReport
Posted on 15 Oct 2019 11:56:30 by 8

Dear All,

I have embedded a Canvas App into a Model Driven App form (Contact). The canvas app has AI builder form processor. I've trained my model and i'm able to read the data as well.

 

The query is, how do i update the same data on a particular record which i've opened in Model Driven form.

 

E.g. I've Opened a contact record with ID C0001 in model driven. In a seperate tab i've uploaded a document which gave me values for certains feilds. Now i have to update the record with ID C0001 with the retrieved values.

 

Regards,

 

 

Categories:
I have the same question (0)
  • niteshdambale Profile Picture
    8 on 17 Oct 2019 at 10:31:40
    Re: How to Update CDS Entity Record using Values from FormProcessor

    Hi @JoeF-MSFT ,

     

    I've sucessfully updated the record using patch function. example : Patch(Contacts,First(Filter( Contacts, ID = DataCardValue2.Text ) ), { 'Address 1: City' : DataCardValue4.Text } )

     

    Where :

     

    a) "Contacts" is CDS entity
    b) "ID" is an attribute in the "Contacts" Entity.
    c) "DataCardValue2.Text" is the value on form processor Card (This is my record identifier)
    d) "Address 1 : City" is the parent.display name of the field on form processor
    e) DataCardValue4.Text is the value captured on form processor and intended to be updated in CDS entity record

     

    Regards.

     

     

  • JoeF-MSFT Profile Picture
    on 17 Oct 2019 at 10:15:18
    Re: How to Update CDS Entity Record using Values from FormProcessor

    Agree with @HSheild. A possible approach is that with ModelDrivenFormIntegration  you can retreive the contract record id, and use the CDS connector in the canvas app to save the results. 

  • niteshdambale Profile Picture
    8 on 17 Oct 2019 at 05:46:15
    Re: How to Update CDS Entity Record using Values from FormProcessor

    Hi @HSheild,

     

    Thanks for your response. I didnt use Saveform, however could manage to update the record using patch function. What i was as follows :

     

    1) Onchange event of Formprocessor used updatecontext to set variable value against each field avialable on my form

    2) I then did set the "Default" property of each field to variable. (This gave me all new values as and when i upload a PDF)

    3) Used a Custom button. On Select property of the custom button used patch function. My function first filtered the record using ID field which is a primary field and which i've set as autonumber..

    Sample Function: Patch(Contacts,First(Filter( Contacts, ID = DataCardValue2.Text ) ), { 'Address 1: City' : DataCardValue4.Text } )

     

    Just to elaborate :

    a) "Contacts" = CDS entity
    b) "ID" is an attribute in the "Contacts" Entity (Primary field)
    c) "DataCardValue2.Text" is the value on form processor Card
    d) "Address 1 : City" is the parent.display name of the field on form processor
    e) DataCardValue4.Text is the value captured on form processor and intended to be updated in CDS entity record.

     

    Further just want one help with respect to point no 2 which i've mentioned above. In case my form consist of Lookup and OptionSet, I am not able to set the default variable value to the fields, as i have "text" value and the field type is Optionset or Lookup.

     

    Regards.


    @HSheild wrote:

    Hi @niteshdambale 

     

    I haven't done this before but I would imagine that you would use the SaveForm action from the ModelDrivenFormIntegration control on your embedded Canvas app.  The (light) documentation is here https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/embedded-canvas-app-properties-actions

     

    I'm also interested in this so let me know if you try this and it works.



    @HSheild wrote:

    Hi @niteshdambale 

     

    I haven't done this before but I would imagine that you would use the SaveForm action from the ModelDrivenFormIntegration control on your embedded Canvas app.  The (light) documentation is here https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/embedded-canvas-app-properties-actions

     

    I'm also interested in this so let me know if you try this and it works.


     

  • H Sheild Profile Picture
    3,005 Most Valuable Professional on 16 Oct 2019 at 06:37:27
    Re: How to Update CDS Entity Record using Values from FormProcessor

    Hi @niteshdambale 

     

    I haven't done this before but I would imagine that you would use the SaveForm action from the ModelDrivenFormIntegration control on your embedded Canvas app.  The (light) documentation is here https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/embedded-canvas-app-properties-actions

     

    I'm also interested in this so let me know if you try this and it works.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete