Skip to Content
3
Feb 13, 2022 at 09:58 AM

Set Version Properties In a Model Through Script

311 Views Last edit Feb 14, 2022 at 07:29 PM 2 rev

Hi,

My question is simple, or at least I think so. Is there any way to set the properties of a version in a model using script in an analytic application?

image.png

*Screenshot of the dimension "Version" with two members and some properties.

I want to ask to the user for some info by input text widgets, and then input this data as version properties in the model. I am currently copying an existing version and publishing it.

Table_1.getPlanning().getPublicVersion("Actual").copy(versionName, PlanningCopyOption.NoData, PlanningCategory.Planning);

Table_1.getPlanning().getPrivateVersion(versionName).publishAs(versionName, PlanningCategory.Planning);

Then using the function modelName.updateMembers("Version", {id: versionName, properties: {CloseDate: "202102"}};

The message shown if i consol.log the result of this function is: "Dimension type VersionDim is not supported".

I don't know what to do. Any help?

Thank you so much in beforehand :)

Attachments

image.png (10.9 kB)