I'm working with a SharePoint Lookup field in Plumsail Forms to add multiple options from a separate list based on a lookup value.
In the screenshot example above, I'm filtering on the Ultra-Small Desktop (UDT) product category and adding the filtered values in the Upgrade Parts column.
The data format that's getting written back to my SharePoint column appears to be an object:
{"id":24,"text":"Windows 11 Professional, NON-AFIN"},{"id":22,"text":"Intel Core i5-12400 / UHD 730"},{"id":20,"text":"Upgrade to 64GB"},{"id":31,"text":"OCONUS - Upgrade to 64GB"}
My goal is to just get a list of the Upgrade Parts written to a SharePoint field (optimally a multiple Choice field, but even a regular string field is fine) but I can't figure out how to parse it out.
Is this something I can do with Javascript & an onSave() command?
Hi Maragarita -
The fields are: Product Category = SharePoint Choice field, used to filter values from a separate list Upgrade Parts = Form lookup field from 2nd list, dependent on Product Category. Multiple items are added here Upgrades = SharePoint string field containing the object/array data from the Upgrade Parts lookup form field Upgrade Options = SharePoint Mutiple Choice field
What I'd like to happen:
Select a Product Cateogry from the SharePoint choice field
Select all Upgrade parts from the filtered list form field
On save, populate a SharePoint multiple choice field with the items selected in the Upgrade Parts filtered list form field
The end goal is to get the options from the filtered list form field copied into a SharePoint multiple choice field - hopefully that makes more sense.
Thanks Maragrita!
One tweak to the code you sent - the LookupFieldName is a control, so I had to change it from fd.field.('LookupFieldName').value to fd.control('LookupFieldName').value
(Just in case anyone comes back to reference this post).