Skip to main content
Oct 3, 2023 1:27 PM UTC
Solved

Assigning value to WTPart attribute stream

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

 

Oct 3, 2023 2:16 PM UTC

@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

4 replies

Oct 3, 2023 1:51 PM UTC

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

smcvrAuthor
Oct 3, 2023 2:13 PM UTC

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);
Oct 3, 2023 2:16 PM UTC

@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