Is there a way to search the Seed/MetaData in a specific package?

#1

For example, if I wanted to get all the SimpleMetric objs in the foundation package is there a way to do that with TagMetadataStore?

0 Likes

#2

The question is insufficiently specified.

When you say SimpleMetric objs IN foundation, do you mean such objects which were originally defined in foundation and not modified by other packages? or which were defined in foundation and maybe modified? or which were defined in another package and ‘finally’ modified in foundation?

Or maybe you mean all SimpleMetric objects which were defined or modified , finally or otherwise, in foundation?

0 Likes

#3

I mean the most intuitive interpretation of ‘in’, ie what would I find if I manually searched each seed data file in the package X for SimpleMetrics.

0 Likes

#4

This should work for you:

MetadataStore.tag().readSeedObjs(“SimpleMetric”)

0 Likes

#5

I ran that on platform v 7.5.0.1273-1, and got this error: “Field meta doesn’t exist in type Boxed”

Im assuming that command will return all the SimpleMetrics in the current tag, if so, how does that help me determine which package each metric came from?

Thanks for your help.

0 Likes

#6

I think you should be able to do MetadataStore.forPackage('foundation').readSeedObjs("SimpleMetric"), or PackageMetadataStore.package('foundation').readSeedObjs("SimpleMetric"), but those are throwing errors for me on server 7.5.0.1097-1:

“Unknown metadata package: foundation in AllMetadataStore”
“Unknown metadata package: platform in AllMetadataStore”

For the record Riley’s suggestion does give me the set of simple metrics in the tag on my server, which is a bit older than yours.

0 Likes