Using the list control on the form and set / filter default values

Hello,

I have a form connected to SharePoint 365 based on the list called 'CMDB'. I've then added another list to this called 'Relationships' which has the following fields:
Source (Lookup to CMDB)
Target (Lookup to CMDB)

I'd like to set the default value for every row for 'Source' to be the current item from the CMDB list. Additionally, when I edit / view this, I'd like the list to filter 'source' or 'target' to be the item that I'm in from the CMDB list.

I suspect this will be done within the JavaScript code, but I've only used Plumsail for about 1 hour so I'm pretty new to all of this - so sorry for the daft questions!

If you could assist, or point me in the right direction, I'd appreciate it.

Many thanks,
Dayna

Hello @Dayna,

Welcome to Plumsail Community!

Are you using List or Library control? You can share the screenshot of the form so I'm sure we are on the same page.

Hello @mnikitina,

I'm using the list control, I've realised that the lookup when you first add the control automatically adds the parent value to the child list, and filters it too (very nice!).

The editing functionality of this control though seems limited, is there any javascript you can add to expand on this? i.e. I'd like to add a list control but make it read-only if that was possible.

Here's a screenshot of my form so far:

Many thanks,
Dayna

@Dayna,

You can make the List or Library control read only in the designer. Select the control, in the General section change Read-only property to True:
image

Thank you @mnikitina - is there anything else you can do with this control via Javascript, etc? Not sure what off hand, but curious as to whether there's any further customisation or functionality that could be exposed within this.

@Dayna,

You can set up dynamic filtering of the related items or documents, customize view of columns, update the newly created item when it is created, etc. You can find examples and code samples in our documentation here.

If you have something specific in mind, please share, I will direct you.

1 Like