uStore and empty fields in adors with Qlingo

993 views
Skip to first unread message

Ken Carlsen

unread,
Jan 7, 2013, 4:41:53 AM1/7/13
to xmpie...@googlegroups.com
Hi
 
This is the case. The user should have the opportunity to not insert fax og phone.
 
I have made a uPlan like this:
 
Ador Where campaign dial is off, and linked to variable with If_Else
 
Made a variable that is a Campaign dial
 
Made a variable with if_else and IsNullOrEmpty
 
if (IsNullOrEmpty(@{Telefon}))
{
 ""
}
else
{
 "Telefon: " &FormatNumber(@{Telefon}, "## ## ## ##")
}
 
When running this in uStore I got Variable "Telefon": Empty expression. When I don`t insert any information i the phone field. When inserted phone number, it generates the number with the right format and text.
 
I have also tried to replace"" with null, but get the same error in through uStore...
 
It looks like the Qlingo IsNullOrEmpty don`t work on uStore. I have tested it in uPlan and uProduce where it works perfect.
 
I have version 6.01
 
Have any had the same?
 
Regards
Ken Carlsen
 

thomaus

unread,
Jan 7, 2013, 9:46:48 AM1/7/13
to xmpie...@googlegroups.com
We have been using tests like this:

if ((Length(RTrim(@{Telefon}))>0)

{
 "Telefon: " &FormatNumber(@{Telefon}, "## ## ## ##")
}
else
{
 ""
}

for dials in uStore. But usually we have the fields set as Strings. Yours is a number, so you may have to convert to a string to get it to work. But maybe not.

Mark Kuehn

unread,
Jan 7, 2013, 10:13:25 AM1/7/13
to xmpie...@googlegroups.com
I always use the following syntax:

If( Length( Trim( AsString( @{Telefon} ) ) ) )
{
 "Telefon: " &FormatNumber(@{Telefon}, "## ## ## ##")
}
else
{
 ""
}

This QLingo forces the campaign dial to be of string type, truncates any white space and if the remaining length is not zero, will apply the TRUE clause in the if statement.

-Mark

--
You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
To view this discussion on the web visit https://groups.google.com/d/msg/xmpie-users/-/7lNGQe4CbrAJ.
To post to this group, send email to xmpie...@googlegroups.com.
To unsubscribe from this group, send email to xmpie-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xmpie-users?hl=en.

Ken Carlsen

unread,
Jan 7, 2013, 1:41:54 PM1/7/13
to xmpie...@googlegroups.com
Thanks guys.
 
I have tested both scripts, but when it`s empty i still get the error. Could it be because i use XLIM?
 
Ken

Mark Kuehn

unread,
Jan 7, 2013, 1:54:13 PM1/7/13
to xmpie...@googlegroups.com, xmpie...@googlegroups.com
Should not really matter, InDesign or XLIM, both should go through uProduce and get the uPlan evaluated.



Sent from my iPhone
To view this discussion on the web visit https://groups.google.com/d/msg/xmpie-users/-/YqaE6Xv5YKMJ.

Ken Carlsen

unread,
Jan 7, 2013, 2:58:04 PM1/7/13
to xmpie...@googlegroups.com
I think there is something else thats wrong.
 
 
Could the problem be a that the telefon is a Number in the schema, and i make it a string?
 
 
I have tried to convert the Nuberto a string, but stil get error empty ador.
 
I have a ador with if else and it`s a string, thats works perfect.
 
Ken

Mark Kuehn

unread,
Jan 7, 2013, 3:40:32 PM1/7/13
to xmpie...@googlegroups.com
You cannot use ADOR Campaign Dials for uStore fields with QLingo expressions. The reason is all QLingo will be stripped from the ADOR and only the content entered via uStore will remain.

The proper way to do this is to define a Variable Campaign Dial and assign that entity to a uStore field. Then reference that Variable Campaign Dial within the ADOR that contains the QLingo expression.

However, my understanding is that is what you originally said you were doing. Is that correct?

-Mark

To view this discussion on the web visit https://groups.google.com/d/msg/xmpie-users/-/jvcSA0LkzXkJ.

Ken Carlsen

unread,
Jan 7, 2013, 3:54:43 PM1/7/13
to xmpie...@googlegroups.com
Thats correct Mark.

I have made a Variable Campaign Dial and linked it to the Ador.

It seems that the problem is how the Qlingo reads the empty field in uStore when its a number. It seems that it not trigger the first line when its empty.

This works fine when i generate proof set in uPlan and uProduce. And it works fine in the field that is just string all the way.

I will test to make a new plan tomorrow, with just strings. Se if that is the solution..

Ken

Mark Kuehn

unread,
Jan 7, 2013, 4:06:17 PM1/7/13
to xmpie...@googlegroups.com
In the Plan did you create the Variable with a type of String or Number? If you created the Variable with a type of Number, try switching it to a type of String.

 It really should work with either, but I was just curious. I believe you have uncovered a bug.

-Mark

To view this discussion on the web visit https://groups.google.com/d/msg/xmpie-users/-/6ISUqY6NGQ4J.

Igor

unread,
Jan 7, 2013, 4:14:17 PM1/7/13
to xmpie...@googlegroups.com
what type is your variable @{Telefon}?

Ken Carlsen

unread,
Jan 8, 2013, 1:01:28 AM1/8/13
to xmpie...@googlegroups.com
This is a Phonenumber, 8 digits.
 
The Plan file has three number adors, that fails when empty and one string that works perfect.
 
Ken

Guillaume Besnier

unread,
Jan 8, 2013, 3:34:52 AM1/8/13
to xmpie...@googlegroups.com
ADORs types cannot be "number"; only Schema fields, variables, User View fields and functions can.
Could you share your plan?


-------- Message original --------
Sujet: Re: [xmpie-users] Re: uStore and empty fields in adors with Qlingo
De : Ken Carlsen <k...@brandprint.no>
Pour : xmpie...@googlegroups.com
Date : 08/01/2013 07:01
To view this discussion on the web visit https://groups.google.com/d/msg/xmpie-users/-/17Hlvr1foTsJ.

Igor

unread,
Jan 8, 2013, 9:32:28 AM1/8/13
to xmpie...@googlegroups.com
You are not answering my question , please look in the plan file and check what is your @{Telefon} variable type ?
ADORS have different types from VARIABLES  ADORS can be Text, Style , Graphic while Variables can be text (string) , number, Boolean , date 
Igor.

Ken Carlsen

unread,
Jan 8, 2013, 12:11:50 PM1/8/13
to xmpie...@googlegroups.com
Sorry Igor.

They are number.

Ken

Igor

unread,
Jan 8, 2013, 12:54:00 PM1/8/13
to xmpie...@googlegroups.com
change it to string and make proper adjustments to the uPlan if needed .
Also go to uStore , place product offline and update Update Local Cache 

Ken Carlsen

unread,
Jan 8, 2013, 1:15:21 PM1/8/13
to xmpie...@googlegroups.com
Thanks Igor

I have now replaced the Plan file with a new one with string and uploaded. Thats working and make previews with and without phone and fax number.

Ken
Reply all
Reply to author
Forward
0 new messages