Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Assets Admin Search Rail

Avatar

Level 3

Hi,
We have a requirement to select default folder field from the dropdown after selecting a particular path in AEMAACS.

Screenshot (679).png

let's say we select the path as "/content/dam/exampleA" for this path in dropdown folder field needs to be selected as default.
Is there any way that can be done using the OOTB functionality?
please help us trying to solve above requirement.

Thanks

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi, 

I don't think there is an OOTB way to do this unless you overlay and update the original script that build that page. Alternatively, you could use JS to achieve such functionality. Something like the below would work:

    // Find all elements with the specified tag and class
    var elements = document.querySelectorAll('coral-selectlist-item-content._coral-Menu-itemLabel');

    // Iterate over the elements to find the one with the specific text
    elements.forEach(function(element) {
        if (element.textContent.trim() === 'Files & Folders') {
            // Click the element if the text matches
            element.click();
        }
    });

Keep in mind that the above code should be triggered once the button is loaded on the screen.

Hope this helps.



Esteban Bustamante

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi, 

I don't think there is an OOTB way to do this unless you overlay and update the original script that build that page. Alternatively, you could use JS to achieve such functionality. Something like the below would work:

    // Find all elements with the specified tag and class
    var elements = document.querySelectorAll('coral-selectlist-item-content._coral-Menu-itemLabel');

    // Iterate over the elements to find the one with the specific text
    elements.forEach(function(element) {
        if (element.textContent.trim() === 'Files & Folders') {
            // Click the element if the text matches
            element.click();
        }
    });

Keep in mind that the above code should be triggered once the button is loaded on the screen.

Hope this helps.



Esteban Bustamante