Can someone guide me on how to check how many save...
# sdf
r
Can someone guide me on how to check how many saved searches are using one of the custom fields in a record using SDF?
b
If a saved search depends on a custom field, it will have a
<dependencies>
tag indicating which fields are required. You could do a search through your saved search XML objects to figure that out.
r
I want to know if any saved search is using that custom field. Not just a single one. Never used SDF so require some guidance.
b
Right, so look at every saved search XML object, and see if it has the
<dependencies>
tag. If it does, then see if it has the field referenced there. Do that for all of the saved searches.
r
I will have more than 2000 saved searches in the system. Is there any easier way like i could do a search on entire dump somehow with field internal I'd and see where it's all being used.
b
Here's an example
If you have all the XML files on your computer, then use some software that can do a find in multiple files
You could use Notepaad++
r
That i can do. How can I get all these XMLs ?
b
Oh, I thought you were already using SDF. Create a new SDF project on your computer. Import all saved searches from NS into your project.
r
Got it. Will check thanks.
d
I have a m/r script that can do this. Basically you load the saved search and check the filters/columns for what you're looking for.
s
I frequently use a little command line utility called
ag
to search file content
r
Can you share it dcrsmith ?
d
@raghav Give me an account number and I can provision the bundle.