Latest news 2021-06-05: New blog post: Dickimaw Books Site Account.

Bug Tracker

ID 78🔗
Submitted by: Nicola Talbot 🦜
Date: 2015-02-24 04:56:47
Status Closed (Fixed)
Category datatool
Version 2.22
Summary \DTLifSubString fails inside \DTLforeach

Sign in to subscribe to notifications about this report.

Description

An error occurs when \DTLifSubString is used inside \DTLforeach. Error message:
Runaway argument?
\expandafter \dtl@ifsingle \expandafter {\dtl@first }{\expandafter \@dtl@testif
substring \ETC.
! Paragraph ended before \dtl@getfirst was complete.
<to be read again> 
                   \par 
l.19 
See also “Misplaced \noalign” error with datatool.

MWE

Download (335B)

\documentclass{article}

\usepackage{datatool}

\begin{filecontents*}{xx.csv}
2014.02.26
2014.11.12.tm
mm
\end{filecontents*}

\begin{document}

\DTLloaddb[noheader,keys={RowID}]{newbDB}{xx.csv}

\DTLforeach*{newbDB}{\RowID=RowID}%
{%
   \DTLifSubString{2014.02.26,26,2014.11.12.tm}{\RowID}{}{}%
}%

\end{document}

Evaluation

It turns out this error isn't connected to \DTLforeach and can be reproduced with a far simpler example:

\documentclass{article}

\usepackage{datatool}

\begin{document}

\DTLifSubString{m}{mm}{TRUE}{FALSE}

\end{document}
This has now been fixed in v2.23.

Comments

0 comments.


Add Comment

Name (optional):

Are you human? Please confirm the bug report ID (which can be found at the top of this page) or login if you have an account.

Comment:

You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

You can use the Preview button to review your message formatting before submitting.

Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=78