Expose Values From An Existing Infopath Champaign To A Sharepoint Field

By Thursday, April 12, 2018 on April 12, 2018 Tags:
Expose Values From An Existing Infopath Champaign To A Sharepoint Field.


Photo yesteryear adrian on Unsplash

Ok, I know InfoPath is non the futurity too all, only I occur to convey i client which has an onetime InfoPath solution for reporting incidents at their facility. I convey previously migrated this from SharePoint 2007 to 2013, which involved around XML manipulation inwards the process, too I did spare yous a weblog postal service on this :-)

Either way, the lists of incidents which goes dorsum years convey directly been hooked upward to PowerBI via the on-premises gateway, too then the client is tardily taking the boundary to the cloud.

And, turns out, the appointment plain which has the appointment of the incident was never exposed equally a SharePoint field, a plain which is pretty squeamish to study on for incidents.

I fired upward SharePoint designer, promoted the plain inwards query too re-published the InfoPath form. This ensured all novel items would convey a appointment inwards the incident appointment field, only all existing items were yet blank. So how could I inwards the easiest trend possible larn the value from the XML files promoted to the SharePoint field? Turns out it was rattling very rattling easy.

It was a affair of looping over all listing items too running SystemUpdate() on them. This ensured modified appointment too modified yesteryear fields were non changed, only the value got populated.

Below is my PnP PowerShell snippet which saved the day.

Get-PnPListItem -List "Incidents" |% { $_.SystemUpdate();$_.Context.ExecuteQuery() } 
Thanks for reading : Expose Values From An Existing Infopath Champaign To A Sharepoint Field


Related Post