Remove dropdown filter based on another fields value

Im currently migrating a form from Forms Designer to Plumsail Forms 3. On the old form we used Plumsail Lookups to filter a dropdown 'equipment' based on the chosen option from the 'site' dropdown. The site dropdown has an option 'All Sites' which was used to remove any site filter from the equipment dropdown, displaying all equipment items irrespective of related site. Old code below:

function (term, page) {
  // Getting the selected facility
  var facilityId = fd.field('Site').value();
  if (!facilityId) {
    facilityId = 0;

  // No site filter
  if (facilityId == 11) {

 if (!term || term.length == 0) {
        return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField},Site/Title&$expand=Site/Title&$orderby={LookupField}&$top=40";

   return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField},Site/Title&$expand=Site/Title&$orderby={LookupField}&$filter=substringof('" + encodeURIComponent(term) + "', {LookupField})&$top=40";
  // Filtering by the selected facility
  if (!term || term.length == 0) {
    return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField},Site/Id,Site/Title&$orderby={LookupField}&$expand=Site/Id,Site/Title&$filter=Site/Id eq " + facilityId + "&$top=40";
  return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField},Site/Id,Site/Title&$orderby={LookupField}&$expand=Site/Id,Site/Title&$filter=substringof('" + encodeURIComponent(term) + "', {LookupField}) and Site/Id eq " + facilityId + "&$top=40";

How can I achieve the same result in Plumsail Forms 3? Ive currently got the following options set on the equipment dropdown:

CleanShot 2023-11-20 at 13.58.08@2x

Dear @Jaydius,
Good to see the migration :smiley: While this new filtering is great for simple conditions, when you need to match one field to another field, it might not work in all scenarios.

Similar filtering conditions to what you have can be written with JavaScript - Configure lookup field filters on a SharePoint form with JavaScript — SharePoint forms

You're essentially writing the same string with the same syntax, but you only change the $filter= part.