How to download in a script USED BY info on the database? | Community
Skip to main content
Level 2
September 10, 2021
Solved

How to download in a script USED BY info on the database?

i would like to download in an script this items, is there a standard field in the api that i could use to download the info from FIELDS USED BY?

Thanks

 
 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
September 12, 2021
Like Floyd says, there’s no (REST) API to fetch these dependent assets.

Are you trying to fetch them for all fields, or just for the currently highlighted field?

7 replies

Thorsten
Level 3
September 14, 2021

I was looking at a similar problem just the other day. I put together a script I can run in the F12 console that will give you that page's Used-By, incl. text and link (I manually copy&paste those into a speadsheet to send to users to go and remove dependencies afterwards).

 

You might have to play a bit with the parameters/filters I used to make it work for your case, and replace the URL with your Marketo location.

// Scrape "Used-By" from Marketo Fields Management let urls = document.getElementsByTagName("a"); for (let i = 0; i < urls.length; i++) { if (urls[i].getAttribute("href") != "#" && typeof urls[i].getAttribute("href") == "string") { if (urls[i].getAttribute("href").length > 5 && urls[i].innerText != "None" && urls[i].innerText != "Change Type In Progress") { console.log(urls[i].innerText + "," + "https://app-xxx.marketo.com/?meue&meueDataOnlyMode" + urls[i].getAttribute("href")); } } }

 

See if that helps a bit.

Translate
ivanherAuthor
Level 2
September 20, 2021

Hello, thanks for this i will use it, i really appreciate it!

Translate
SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
September 12, 2021
Like Floyd says, there’s no (REST) API to fetch these dependent assets.

Are you trying to fetch them for all fields, or just for the currently highlighted field?
Translate
ivanherAuthor
Level 2
September 13, 2021

Thank you! well the goal was to download it that way, so i guess i got my answer, thank you!

Translate
Employee
September 12, 2021

@ivanher 

From memory, I don't think there is an API that allows you to fetch the USED BY for fields.

There is a manual option to do it via the UI - but I assume that is not what you want.

Translate