To me, much of the code looks strange (sorry, I dont have time to look at it too closely now)
If you have an item in a folder, and the folder has a field 'unit_goal' and 'unit_goal' also is an index, you can get it, for example by :
goal = context.aq_parent.unit_goal.
Then you can find (other) items inside that folder with plone.api.find(portal_type="UnitType", unit_goal=goal)
(assuming unit_goal if a string or something else 'usable')
Then, when you loop through the items, you append value, token and title,
I think I have used brain.UID for the value and/or token and brain.Title for title.
Then, I would look up the item (if you need that) in the template by uid, for example
ok, please use unit = context.aq_parent.define_unit instead of unit = api.content.get(UID=context.aq_parent.UID()).define_unit and things should be moving forward again.
If this doesn't help, you should find a Plone solution provider nearby.