AnsweredAssumed Answered

Unexpected action of TextStyleRemove function

Question asked by BartekChromik on Apr 27, 2015
Latest reply on Jun 13, 2015 by philmodjunk

Title

Unexpected action of TextStyleRemove function

Post

Hello,

I wanted to create a tagging system in my data-base, a selected word becomes highlighted or underlined. It works perfectly. However the problems appears when I want to delete highlighting or underline.

I have created a script to delete highlighting in the entire field:

Go to Field [Citations:Citation]

Select All

Insert Calculated Result [Select; Citations:Citation; TextStyleRemove(Middle(Citations:Citation; Get(ActiveSelectionStart);Get(ActiveSelectionSize));Underline]

The script works perfectly unless the first character of field Citation is underlined. Then instead of removing underline it actually does the opposite it underlines the whole field. Do You know what is the reason for that? I can send some printscreens or send a piece of code. I will be greatful for your help.

 

 

 

Outcomes