VMware Cloud Community
atfrys
Hot Shot
Hot Shot

catalogrequest lookup output formating issue

I have a lookup workflow that takes the catalogrequest ID and finds out what the status is.  My issue is the value is not returned as just the status.  It returns like: DynamicWrapper (Instance) : [vCACCAFERequestState]-[class com.vmware.vcac.catalog.rest.stubs.RequestState] -- VALUE : IN_PROGRESS

Is there a way without trimming to just get the value?

Thank you

-Stephen

0 Kudos
2 Replies
JamesMW
Enthusiast
Enthusiast

Yep, you just need to access the state object property.

So if your vCACCAFECatalogItemRequest object is named 'obj', to get the state value, reference it like:

obj.state.value();

That will return the string "IN_PROGRESS".

-James

0 Kudos
JamesMW
Enthusiast
Enthusiast

You can figure this out by looking in the API explorer for the object: DynamicWrapper (Instance) : [vCACCAFERequestState]


api.png


Then figure out what property / method will return the value you need.

0 Kudos