cancel
Showing results for 
Search instead for 
Did you mean: 

Computed Read/Write Extended Attribute - how to set the value from the Form?

Former Member
0 Kudos

Hello everyone,


seems to be a simple case but does not work in my environment:


1. In an LDM, I set up an Extended Attribute for an Entity Attribute as Computed: Read/Write (Get+Set methods)

2. I want to compute it conditionally, i.e. if (some_condition=TRUE) then Extended Attribute should get some computed value X else it should simply get the value put manually on the Entity Attribute Form

3. Conditional computing works, but unfortunately I am not able to update it manually - I tried all the possible combinations of implementing Get and Set methods, but with no success. It seems I am not able to get the value from the Form and set it to this Computed Read/Write Extended Attribute, is it feasible at all? Putting aside the conditional computing, simple getter and setter for a Computed Read/Write Extended Attribute should in my opinion look like this, shouldn't it?

Function %Get%(obj)
  %Get% = obj.GetExtendedAttribute("ExtAttr")
End Function

Sub %Set%(obj, value)
   obj.SetExtendedAttribute "ExtAttr", value
End Sub

Thanks in advance and best regards,

Jacek

Accepted Solutions (1)

Accepted Solutions (1)

marc_ledier
Active Participant
0 Kudos

Hi,

You need two attribute. First will be the stored value of your attribute, second will be the computed one (a computed attribute does not store anything, it is computed).

The computed Get function will read value from stored attribute, the Set function will set the stored attribute.

Then, you can add any computation you want.

Marc

Answers (0)