I'm fairly new to Openoffice and I need your help.I have a document here in openoffice with datasource. What I want to accomplish is to replace the sub template field with the description. See screenshot below.

So basically I want to replace Sub Template field values with Description field values depending on the Main Template field, which are the bold fonts on the document.

Can we do it just like that? Or do we need to put markings? I'm really out of ideas.Does it need macro or just a simple formula? By the way, I don't know how to do macros either I'm really new to Openoffice.