Home > front end >  How can i convert Details form into a json in powerapps?
How can i convert Details form into a json in powerapps?

Time:09-11

'PowerApp->Content'.Run(JSON(DetailForm1,JSONFormat.IncludeBinaryData)

I am trying to put this action on a button but im getting an error

the json function cannot serialise objects of type control

Is there any workaround to this? I want to send data to create a new excel file.

CodePudding user response:

You probably don't want to serialize the form itself, but the updates that the form would send to the data source associated with it. If that's the case, then you can use this expression:

'PowerApp->Content'.Run(JSON(DetailForm1.Updates))

Notice that the edit form control has an Updates property, while the display form control does not. Not sure which type your 'DetailForm1' is, but if it is a display form, you can replace it with an edit form, and set its DefaultMode property to FormMode.View, and that will make it essentially a display form.

  • Related