DTLfetch not working with Variable
up vote
0
down vote
favorite
I have csv database loaded in data
variable.
I am trying to fetch value from particular column given an another column name and its value.
I am using following code
forloop{i}{1}{value{i} < 30}
{
DTLfetch{data}{Number}{value{i}}{Day}
}
Above code works well when there is hard coded numerical value like 1,2,3,...
but somehow it is not able to catch the value of argument value{i}
. What am I not doing right?
pdftex datatool for-loop
add a comment |
up vote
0
down vote
favorite
I have csv database loaded in data
variable.
I am trying to fetch value from particular column given an another column name and its value.
I am using following code
forloop{i}{1}{value{i} < 30}
{
DTLfetch{data}{Number}{value{i}}{Day}
}
Above code works well when there is hard coded numerical value like 1,2,3,...
but somehow it is not able to catch the value of argument value{i}
. What am I not doing right?
pdftex datatool for-loop
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have csv database loaded in data
variable.
I am trying to fetch value from particular column given an another column name and its value.
I am using following code
forloop{i}{1}{value{i} < 30}
{
DTLfetch{data}{Number}{value{i}}{Day}
}
Above code works well when there is hard coded numerical value like 1,2,3,...
but somehow it is not able to catch the value of argument value{i}
. What am I not doing right?
pdftex datatool for-loop
I have csv database loaded in data
variable.
I am trying to fetch value from particular column given an another column name and its value.
I am using following code
forloop{i}{1}{value{i} < 30}
{
DTLfetch{data}{Number}{value{i}}{Day}
}
Above code works well when there is hard coded numerical value like 1,2,3,...
but somehow it is not able to catch the value of argument value{i}
. What am I not doing right?
pdftex datatool for-loop
pdftex datatool for-loop
asked Oct 14 at 12:06
charles bell
607
607
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
The macro value
gives the value of the counter as an internal integer.
This is fine if you compare it with another integer as in {value{i} < 30}
,
but for DTLfetch
you need the representation of the number in arabic numerals,
not just some internal integer.
So you can use
forloop{i}{1}{value{i} < 30}
{
DTLfetch{data}{Number}{arabic{i}}{Day}
}
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
The macro value
gives the value of the counter as an internal integer.
This is fine if you compare it with another integer as in {value{i} < 30}
,
but for DTLfetch
you need the representation of the number in arabic numerals,
not just some internal integer.
So you can use
forloop{i}{1}{value{i} < 30}
{
DTLfetch{data}{Number}{arabic{i}}{Day}
}
add a comment |
up vote
0
down vote
The macro value
gives the value of the counter as an internal integer.
This is fine if you compare it with another integer as in {value{i} < 30}
,
but for DTLfetch
you need the representation of the number in arabic numerals,
not just some internal integer.
So you can use
forloop{i}{1}{value{i} < 30}
{
DTLfetch{data}{Number}{arabic{i}}{Day}
}
add a comment |
up vote
0
down vote
up vote
0
down vote
The macro value
gives the value of the counter as an internal integer.
This is fine if you compare it with another integer as in {value{i} < 30}
,
but for DTLfetch
you need the representation of the number in arabic numerals,
not just some internal integer.
So you can use
forloop{i}{1}{value{i} < 30}
{
DTLfetch{data}{Number}{arabic{i}}{Day}
}
The macro value
gives the value of the counter as an internal integer.
This is fine if you compare it with another integer as in {value{i} < 30}
,
but for DTLfetch
you need the representation of the number in arabic numerals,
not just some internal integer.
So you can use
forloop{i}{1}{value{i} < 30}
{
DTLfetch{data}{Number}{arabic{i}}{Day}
}
answered Oct 14 at 19:31
Marcel Krüger
11.2k11535
11.2k11535
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f455138%2fdtlfetch-not-working-with-variable%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown