I am using SharePoint 2019 and Plumsail forms
I have 2 lists
List A
Title, Status, LinktoNewItem
List B
Title, Status, Lookupto_ListA
In List A LinktoNewItem , is link to newitem form to List B. When user click this link it will redirected to List B New Item Form and I want to set Lookupto_ListA will automatically set based on the row item title.
How to achieve in Plumsail form. (LinktoNewItem can set query string .. but on List B form can
Dear @sanaullah102,
Where are your users clicking this link? In List View or on a form?
I have one webpart (rest api call and displaying to html table) .it fetch all records from list A, and want to add new column, link to List B
Dear @sanaullah102,
Can you add parameters to the URL? For example:
https://domain.sharepoint.com/sites/sitename/subsite/_layouts/15/listform.aspx?PageType=6&ListId={listId}&ID=1&lookupvalue=test
on second list B ( new Item form) , how to retrieve the query string value. ?
Dear @sanaullah102,
Try JS code like this:
fd.spRendered(function() {
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
// Replace SingleLineText0 with teh internal name of the field
// 'id' is the name of the parametr
fd.field('Lookup').value = urlParams.get('lookupvalue');
});
Lookup value should be the ID for this to work.
I am trying to create redirect URL's for Forms from C# based webparts.
SPList _list = oWeb.Lists.TryGetList(_SurveryListName);
Guid _ListGuid = _list.ID;
string URL = SPContext.Current.Web.Url + "/_layouts/15/listform.aspx?PageType=8&ListId=" + _ListGuid + "&CIDLookup=" + _itrID;
Response.Redirect(URL);
Redirect is working and it will reach to new item form , But it will remove the additional Query string, Query string value I need to use in New Item form to set control value on the newitem form.
http://WebURL/SitePages/PlumsailForms/Listname/WebAppName/NewForm.aspx
Can you please help to check.
I am using SharePoint 2019 and web part is written in C#
Dear @sanaullah102,
If you're not using Form Sets in redirection, you can give a direct link to form instead, and add your params to it:
https://domain.sharepoint.com/sites/sitename/subsite/SitePages/PlumsailForms/ListName/Item/NewForm.aspx?CIDLookup=1