Hi all,

I would like to set an attribute of type date automatically in a model using a report. The report starts automatically using a macro when the model is reopened. 

In addition to the date, the model status is also to be changed. I have already formulated the code for this and it works. 

        modelStatusTypeNum = ArisData.ActiveFilter().UserDefinedAttributeTypeNum("1fca65d1-e2da-11ee-7126-7268366c9a82");
        aModels.Attribute(modelStatusTypeNum,Context.getSelectedLanguage(),true).setValue("abgenommen")//status auf freigegen setzen

However, I cannot find a way to automatically set the value of the attribute for the date “AT_REL_ON” to the respective valid date.

        var statusseitTypeNum = ArisData.ActiveFilter().UserDefinedAttributeTypeNum("AT_REL_ON");
        aModels.Attribute(statusseitTypeNum,Context.getSelectedLanguage(),true).setValue(getDate(true)))//currentdate--> Does not work

 Can someone help here or give me hints how to solve this?

Thanks in advance,

Stephan

 

 or register to reply.

Notify Moderator