Skip to main content
15-Moonstone
October 3, 2023
Solved

Assigning value to WTPart attribute stream

  • October 3, 2023
  • 1 reply
  • 1412 views

How can I assign a value to the attribute flow defined in WTPart?

 

Best answer by HelesicPetr

@smcvr 

Hmm bad bad.

try to use 

 

PersistenceHelper.manager.refresh

// or 

wt.fc.PersistenceHelper.manager.save

 

I guess that you do something wrong 

PS. the save is the right one I guess. 

PetrH

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
October 3, 2023

hi @smcvr 

 

Something like how to use Persistable Manager? 

 

PersistableAdapter obj = new PersistableAdapter ((wt.fc.Persistable)primaryBusinessObject,null,null,null);
obj.load("Reason_For_Change");
obj.set("Reason_For_Change","stringValue");
obj.apply();
wt.fc.PersistenceHelper.manager.modify((wt.fc.Persistable)primaryBusinessObject);

PetrH

smcvr15-MoonstoneAuthor
15-Moonstone
October 3, 2023

Hi @HelesicPetr,

I tried the solution but the result did not change. I want to assign a value assigned to the n variable to SURFACE_M2 attributes.

I wrote it as in the code you sent.

 

PersistableAdapter obj = new PersistableAdapter ((wt.fc.Persistable)primaryBusinessObject,null,null,null);
obj.load("SURFACE_M2");
obj.set("SURFACE_M2","n");
obj.apply();
wt.fc.PersistenceHelper.manager.modify((wt.fc.Persistable)primaryBusinessObject);
HelesicPetr
22-Sapphire II
22-Sapphire II
October 3, 2023

@smcvr 

Hmm bad bad.

try to use 

 

PersistenceHelper.manager.refresh

// or 

wt.fc.PersistenceHelper.manager.save

 

I guess that you do something wrong 

PS. the save is the right one I guess. 

PetrH