Author Topic: Changing value of TaggedValue  (Read 1873 times)

MMiletic

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Changing value of TaggedValue
« on: August 04, 2023, 11:53:26 pm »
Hello
does anybody know how to change value of TaggedValue.
So basically I want to do something like this.

req = eaRepo.GetElementByGuid("{...}")
req.TaggedValues.GetAt(0) = "Test" # this doesn't work

BR and thank you in advance for your help  :)
M.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Changing value of TaggedValue
« Reply #1 on: August 05, 2023, 12:39:31 am »
You will need an Udate as well.

q.

MMiletic

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Changing value of TaggedValue
« Reply #2 on: August 06, 2023, 09:37:12 pm »
hey q, thank you for help.
Okay I understand that, but the problems is:
    req.TaggedValues.GetAt(0) = "Test"
    ^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?

I don't know how to set value of req.TaggedValues.GetAt(0).

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Changing value of TaggedValue
« Reply #3 on: August 07, 2023, 01:43:35 am »
You need to assign the right object (which getAt delivers). IIRC this has a property Value you need to assign. Somethinng like

Code: [Select]
obj = req.TaggedValues.GetAt(0)
obj.value = "Test"
obj.update()

(Don't nail me on syntax)

q.

MMiletic

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Changing value of TaggedValue
« Reply #4 on: August 08, 2023, 02:48:39 am »
Thanks q, that works  :)