Set value for local fields in EB.Systemtables.setRNew() function.

  • inteser
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 3 weeks ago #24547 by inteser
Hello, In TAFC env, we use R.NEW(FT.LOCAL.REF)<1,2> = 'VALUE', in the case of TAFJ using EB.SystemTables.setRNew() function how can I rewrite this? I tried EB.SystemTables.setRNew((FT.Contract.FundsTransfer.LocalRef)<1,2>,'value'). But it doesn't work. Can anyone please help me with the correct syntax?
 

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Away
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
3 months 3 weeks ago #24548 by VK
Hi
why you need to rewrite it? TAFC syntax should still work.
 

Cheers
VK

Please Log in or Create an account to join the conversation.

  • inteser
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 3 weeks ago #24549 by inteser
Hi, thank you for your response. I am aware of it. But I am trying to write a new routine using libraries only, so don't want to use the TAFC format.

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Away
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
3 months 3 weeks ago #24551 by VK
Good luck with that.. you'll be using wrapper around wrapper around wrapper to actually do the same... :))

I looked into EB.SystemTables.h to see if there's a separate function to set a local field... Firstly thought it's EB.SystemTables.setLocalRefField but no... it sets a global variable LOCAL.REF.FIELD... Nice practice to have 2 separate functions for each global variable - one to get, another to set. Probably the goal was not to let a novice one to ruin some global variable :))) What about using EB.SystemTables.setToday() ?

OK, let's try to see what EB.SystemTables.setRNew expects... Surely not (FT.Contract.FundsTransfer.LocalRef)<1,2> ... Probably field number; thinking about REFRESH.FIELD - maybe it should include value/subvalue number separated by a dot...

So - try:
EB.SystemTables.setRNew(LOCAL.REF.FIELD : '.2', 'value')
 

Cheers
VK

Please Log in or Create an account to join the conversation.

  • inteser
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 3 weeks ago #24552 by inteser
Thank you so much for your effort. Unfortunately, tried the mentioned command EB.SystemTables.setRNew(LOCAL.REF.FIELD : '.2', 'value'), it is still not working. Anyway, appreciation for you time.

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Away
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
3 months 3 weeks ago #24553 by VK
Hi
out of curiosity... Probably you can get the whole LOCAL.REF via EB.Systemtables.getRNew(LOCAL.REF.FIELD), amend it (array<1,2> = 'value') and put back ...

Cheers
VK
The following user(s) said Thank You: inteser

Please Log in or Create an account to join the conversation.

  • inteser
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 months 3 weeks ago #24554 by inteser
Thank you dear, It works perfectly in this way.

Please Log in or Create an account to join the conversation.

Time to create page: 0.085 seconds