Project Replacements don't apply to Custom Columns

Da
DavidS
Posts: 21
Joined: Fri Nov 05, 2010 2:21 am
Platform: Mac

Fri Dec 07, 2018 9:44 pm Post

is this normal? is project replacements made to only filter document text or am I missing something??

Da
DavidS
Posts: 21
Joined: Fri Nov 05, 2010 2:21 am
Platform: Mac

Fri Dec 07, 2018 10:43 pm Post

actually in some cases it replaces, in some cases it doesn't. sometimes I add just a blank line after, and it stops replacing, either I'm missing something or project replacement on columns is extremely erratic?

Here is an example project with the columns export included, where the bug appears: nothing gets replaced
Attachments
ProjectReplacement.txt
(35 Bytes) Downloaded 4 times
ProjectReplacement.scriv.zip
(73.19 KiB) Downloaded 4 times

User avatar
KB
Site Admin
Posts: 20488
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Mon Dec 10, 2018 11:57 am Post

I'm afraid that this is expected behaviour - it's down to the order of operation. Scrivener first goes through and performs the replacements, and then it goes through and inserts document variables. So, in this case, the <$custom:...> replacement is occurring after the other replacements. If it didn't work this way, there would be no way of having replacements insert tags for document variables to replace. Essentially, there has to be a particular order replacements are performed, and there is always going to be some use-case that wants the other order.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."