I want to get latest version number of 50+ appian objects. Is there a way to write some script to get there version number based on their names. Currently i had to open each objects manually and note its version number.
Discussion posts and replies are publicly visible
Hi, you can use the below code but it will be used for some component only which you have to check. I check it for Expression rules, Constants and for interfaces. It won't run for Process model, DT, DS.
a!localVariables( local!items: getcontentobjectswithnumofversions(1, "all", false()), local!itemsToCheck: a!forEach( items: local!items, expression: { Name: keyval(fv!item, "Name", ": ", ",UUID"), version: keyval( fv!item, "Total versions", ": ", ",Created" ) } ), index( local!itemsToCheck, wherecontains( "UAC_account", a!flatten(local!itemsToCheck.Name) ), {} ) )
Other commentor has provided you with the solution but why would you need the versions of the objects in the code? Versions are something that designers use to compare and restore any lost functionality but why would you need to write it as logic in your ER/Interface?
At the time of moving objects from one enviorment to other. I need to keep record of versions that i am deploying.
Thanks Deepak. this will save a lot of time os me.
This sounds like some development standard implemented by the company, which I would challenge - would be interested to hear the business logic behind it.
You can easily compare deployment timestamps to version timestamps if needed, and object versions do not persist between environments - so an object with version 50 in dev will match the same object with say, version 12 in production.
We considered manually logging versions early on, but abandoned it for many reasons, and I have not needed anything like this in 13 years. Just my $.02!
Chris said:This sounds like some development standard implemented by the company, which I would challenge
Agreed - totally a case of (as i said already earlier in the other thread), "putting the cart before the horse" in a sense.
Also, as an aside k5095 it'd be helpful to keep discussion about the same subject all in one thread, instead of starting new threads for something that's still basically the same topic...