Topic Options
#44105 - 07/08/13 12:17 AM How to check data which locates in different
Andy1974 Offline
OL Guru

Registered: 03/26/08
Posts: 110
Loc: Hong Kong
Dear everyone,

I face a problem on how to check the data which it locates more than one location in the spool and then use it to read the access database to retrieve the image path.

Flow :
------
1) Check item code from line 35 to 44 and column 3 to 9 in spool file, if not blank, get the item code.
2) Read access database by item code(key field), if record find, get the item image path(e.g. c:\image\xxxxxx.jpg).
3) Show the image in line 10 & column 15.

Data :
------
___Column
___0000000001111
___1234567890123.....
Row
_________________________
35| _1203457 <--- item code
36| _1345682 <--- item code
37| _1365894 <--- item code
38| _0258436 <--- item code
39|
40|
41|
42|
43|
44|

Do anyone know how to do ?? Using VBscript or other methods ? If using VBscript, can you post the coding ? Because I'm not too familiar on VBscript.

Many thanks !!
Best Regards,
Andy

Top
#44113 - 07/08/13 04:53 PM Re: How to check data which locates in different [Re: Andy1974]
-nth- Offline
OL Expert

Registered: 04/01/03
Posts: 236
Loc: Lincoln, NE
Andy,

I'm not certain of all the details in your scenario but you may want to investigate using the emulated data splitter task.

Once you capture your spool file you can step or branch to an emulated data splitter. This allows you to split the data into much small chunks for processing (even line by line if necessary). That way your data doesn't "move" around... i.e if you're looking at a single line it becomes easier to determine if the data is valid and take action.

Hopefully that makes sense.

-Nate

Top
#44115 - 07/08/13 09:47 PM Re: How to check data which locates in different [Re: Andy1974]
Andy1974 Offline
OL Guru

Registered: 03/26/08
Posts: 110
Loc: Hong Kong
Dear Nate,

Thanks your reply !
Sorry everyone, I think my english expression is bad, let me explain my question again.

Actually, I've a report and each page has 66 lines. In the report, there is a item code prints from line 35 to 44, but
it's not necessarily appear in all lines.

I want to get the item code to read the access database, if
it finds in database, get the item image path from database,
but the question is how can I be from 35 lines to 44 lines to read the item code, and then use it to read access database??

If the item code is appeared in one line, I know how to do.
However, the item code is appeared more than one line, so I don't know how to do ?

Do anyone have any suggestion to me ?? I think VBscript may help to do this, but I'm not too familiar on it.

Because my boss wants me to complete this work as soon as possible, but now I face this problem, so I quite worry about this.

Thank you !
Best Regards,
Andy

Top
#44121 - 07/09/13 10:24 AM Re: How to check data which locates in different [Re: Andy1974]
-nth- Offline
OL Expert

Registered: 04/01/03
Posts: 236
Loc: Lincoln, NE
Andy,

I suppose you could use VBscript to accomplish this but you wouldn't need to. I'd just create a branch off the input (a branch essentially creates a copy of the data) and then run it through a loop task that uses a variable that starts at 35 and ends at 44. This allows you to read just the appropriate lines to check the database.

The workflow logic and tasks take a little getting used to, but are pretty powerful. Go ahead and keep posting as you make progress and have questions. Though, if you're looking for a quicker resolution and have software support, I'd suggest opening a support case with Objectif Lune and they should be able to coach you through the details.

-Nate

Top
#44129 - 07/10/13 01:54 AM Re: How to check data which locates in different [Re: Andy1974]
Andy1974 Offline
OL Guru

Registered: 03/26/08
Posts: 110
Loc: Hong Kong
Dear Nate,

Many thanks your reply !

Sorry, my planetpress knowledge is not good, I'm not fully understand your suggestion, do you mind to post the captured screen of your workflow and explain to me ?

Thank you so much !
Best Regards,
Andy...

Top
#44137 - 07/10/13 06:00 PM Re: How to check data which locates in different [Re: Andy1974]
-nth- Offline
OL Expert

Registered: 04/01/03
Posts: 236
Loc: Lincoln, NE
Andy,

Again I'm just going off what I understand of your description... opening a support case with Objectif Lune is the best course of action should you need additional support beyond what the forums provide.

Think of this info as inspiration rather than exactly how you'll need to build it. smile (In fact I'm certain you'll need to move and change tasks based on your actual data)



The first task: Set Job Info and Variables assigns a value of 35 (the line you want to start with) to a local variable I created called LineNum.

The second task: Loop sets up for 10 iterations (35-44) in order to get each potential image location from the relevant line.

Third task: Set Job Info and Variables assigns a different local variable (DbLookup) the value from the data. The "magic" here is that the line number is dynamically read from the LineNum local variable like so:
Code:
@(1,%{LineNum},%{LineNum},3,9,KeepCase,Trim)


Fourth task: PlanetPress database - do your database lookup using the DbLookup variable.

Fifth task(s): Comment - replace this with however you'll assign the retrieved value to some other variable or store it in a file.

Sixth task: Mathematical Operations - Increments the LineNum variable by 1 for next loop.

Hope this helps,
-Nate

Top
#44142 - 07/11/13 05:13 AM Re: How to check data which locates in different [Re: Andy1974]
Andy1974 Offline
OL Guru

Registered: 03/26/08
Posts: 110
Loc: Hong Kong
Dear Nate,

Firstly, thank you very much for your big help on my problem and explain the work flow in detail to me. I'm understand how to setup in my flow now.

However, in your suggested sixth task, there is one 'Mathematical operations' task, is it a new function in new version of planetpress ? Because the version of my company installed planetpress is 7.1, so I can't find it. Except use this fucntion, is there any other operations can do the same function of it ?

Sorry, let me ask one more question. After done fourth task in the flow, I can retrieved a value from access database and stored it into one local variable which called 'Imagepath'.

Is there a way of recalling this local variable 'Imagepath'
from watch onto a document ?

Because this local variable is stored image path, so I want to set this value in 'Picture' object in design document and then the document can display the image.

I'm very grateful to you again for your help !!!

Thanks & Best Regards,
Andy...

Top