Bind List Or Library Control drop down according to particular fields

Hello, community,
I want to achieve something like below,
I have Three List,
1>PersonalRecord (with fields LoginID,Fname, Lname etc.)
2>Contract (LoginID, BeginDate, EndDate, Department etc.)
3>UserDetails (LoginID, Person, Department etc.)

I have form in PersonRecord List, I create list or library control in this form, and i have single line of text fields that i will use for filtration,
Here is my form Design,

When User Enter any value in LoginID fields, it will check data in list UserDetails,

As you can see one user can have multiple departments, Here harsh user have department management and service,

so in form when user enter email for user harsh and try to enter details in list or library only 'Management' and 'Service' Option should be there, as of now i took single line of text in list Contracts for Departments and choice fields in 'UserDetails'.

Please Let me know if you have any doubt/Query in understanding problem,

Thanks in Advance.

Hello @harshp924.

You can retrieve the list of departments for the specific user using PnPjs library.

Then, if you want to filter items in list or library control dynamically based on the user email, you can refer to this article.

If you are using List or Library control in inline editing mode, you can filter lookup field using the code from Manipulate fields in inline editing mode article.