cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Assigning value to WTPart attribute stream

smcvr
14-Alexandrite

Assigning value to WTPart attribute stream

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

 

ACCEPTED SOLUTION

Accepted Solutions
HelesicPetr
22-Sapphire I
(To:smcvr)

@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

View solution in original post

4 REPLIES 4
HelesicPetr
22-Sapphire I
(To:smcvr)

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

smcvr
14-Alexandrite
(To:HelesicPetr)

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 I
(To:smcvr)

@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

smcvr
14-Alexandrite
(To:HelesicPetr)

Hi @HelesicPetr 

Thank you so much for your help 🙂

Announcements
Top Tags