I have attached the script below. You need to use a script editor to your list new/edit form to insert the script. Do not forget the replace the list/column names with yours.
19132-lookuocolumn.txt
How to bind lookup colum based on condition in SP Online
Hi friends,
I have list List1 with columns CoL1 (Single Line text) and Col2( Person or Group) .
My requirement as below:
When create a new item from other list List2 and with columns Col1( Lookup column) that need to populate only with the items from Col1 of List1 and Col2 of List1 is equal to Current user .
Could you please help to full fill the requirement
Regards
Raj
Microsoft 365 and Office SharePoint For business Windows
2 answers
Sort by: Most helpful
-
Jerry Xu 256 Reputation points
2020-08-20T10:03:58.69+00:00 -
Raj Shekar 21 Reputation points
2020-08-20T19:35:18.753+00:00 Hi Jerry,
Thank you for sharing the script.
The scriptis not working for custom Person or Group coulmn,its only working for createby (Author column) which is default.
How to write the api with filter with custom Person or Group in Rest API URL. please provide