Hi All ,
In the following post I would like to show how to do the Import data from XML to Data verse using Power Apps and Power Automate.
I have defined my XML File like below and stored this file in SharePoint document library .
following is the Power Automate implementation at the high level.
GetXML from the File Content.
GetXMLData from the Xpath xpath(xml(outputs('GetXML')), '//registration')
Now looping the XML content and adding the same to data verse table .
varXML - xpath(xml(item()), 'string(//author)')
Checking for the dob null value before inserting to table.
DOB - xpath(xml(item()),'string(//dob)')
FirstName - xpath(xml(item()), 'string(//FirstName)')
LastName - xpath(xml(item()), 'string(//LastName)')
Calling Power Automate from Power Apps :
Now the above power automate will be called from Power Apps button , which will insert to records to data verse table .
UpdateContext({locSuccessMessage: ""});
Set(
gblFlowStatus,
Restore_GetData_XML.Run()
);
If(
gblFlowStatus.completed = "true",
UpdateContext({locSuccessMessage: "Import job completed successfully"});
Refresh(Registrations)
);
ClearCollect(
collErrorRegistration,
Errors(Registrations)
);
0 comments:
Post a Comment