Need more, need help now?
- - - - - - - - - - - - - - - - - - pay-as-you-go support - no contract - tenth of an hour billing - expert help - fast service - no call queues
Need integration?
- - - - - - - - - - - - - - - - - - with your shipping system - website - invoicing system - crm - cms - manufacturing - order import - back to back orders..
Need a report?
- - - - - - - - - - - - - - - - - - Excel reporting that pulls data from Sage - custom layouts - layouts that change adapt to your brands and/or for drop shipping.
Want web hosting?
- - - - - - - - - - - - - - - - - - Your own domain name - email - a shop - wordpress - woo commerce - ticket systems - help desks - forums - portals

Selected Courier Hyperlink with Consignment No

Report design issues and solutions.
Post Reply
nsa100
User
User
Posts: 5
Joined: 14 Mar 2018, 20:39
Sage Version: v2018 24 UK/Europe/Africa

Selected Courier Hyperlink with Consignment No

Post by nsa100 » 14 Mar 2018, 20:49

Hello Bruce

I am trying to create a field in a Sales Order where is shows the correct Hyperlink with the Consignment Number based on the Internet Resource Number.

For Example:

TNT = Internet Resource 1
DHL = Internet Resource 2

I can do it by adding the Hyperlink in the Internet Resource NAME providing the link is not too long.
SALES_ORDER.COURIER_NAME + SALES_ORDER.CONSIGNMENT

I would prefer is there is a way to do by SALES_ORDER.COURIER_NUMBER, using IF ....THEN....

Many thanks
James

User avatar
brucedenney
Site Admin
Site Admin
Posts: 4619
Joined: 28 Feb 2006, 09:56
Sage Version: v28 UK/Europe/Africa

Re: Selected Courier Hyperlink with Consignment No

Post by brucedenney » 15 Mar 2018, 10:42

The if then functionality is not obvious ...

Format of a basic If statement

A typical If statement uses the following format:
Condition ? Instruction 1 : Instruction 2
where:
* The ? command is used to mean then.
* The : command is used to mean else.

The expression is therefore saying:
If the condition is true THEN apply instruction 1, ELSE apply instruction 2.
When constructing the If statement, you must always include at least one condition, an instruction 1 and an instruction 2.Format of a nested If statement
You can specify more than one condition with different results within one expression. This is a nested If statement.
Nested If statements use the following format:
Condition 1 ? Instruction 1 : Condition 2 ? Instruction 2 : Instruction 3
where:
* The ? command is used to mean then.
* The : command is used to mean else.

The expression is therefore saying:
If condition 1 is true THEN apply instruction 1, ELSE if condition 2 is true THEN apply instruction 2, ELSE apply instruction 3.
When constructing a nested If statement, you must always end the statement with an else instruction to cover when the specified conditions aren't met.


Here is the sort of thing you would do...

Code: Select all

SALES_ORDER.COURIER_NUMBER=1?"www.tnt.com/parceltrack/?q=."+SALES_ORDER.CONSIGNMENT:
SALES_ORDER.COURIER_NUMBER=2?"www.dhl.com/parceltrack/?q=."+SALES_ORDER.CONSIGNMENT:
"unknown courier"
For just about anything Sage :- Discount subscriptions, pay-as-you-go support, application integration, reports, layouts, linked excel spreadsheets, analysis or any other help making life with sage easier/less time consuming Contact me.

nsa100
User
User
Posts: 5
Joined: 14 Mar 2018, 20:39
Sage Version: v2018 24 UK/Europe/Africa

Re: Selected Courier Hyperlink with Consignment No

Post by nsa100 » 15 Mar 2018, 20:11

Hello Bruce

Many thanks....you are a genius. :!:

These are the links I did it for TNT and DHL for anybody else:
SALES_ORDER.COURIER_NUMBER=1?"https://www.tnt.com/express/en_gb/site/ ... ONSIGNMENT:
SALES_ORDER.COURIER_NUMBER=2?"www.dhl.co.uk/en/express/tracking.html? ... ONSIGNMENT:
"unknown courier"


For the 'icing on the cake' can you explain how to show the relevant Courier logo based on the SALES_ORDER.COURIER_NUMBER ?

Many thanks again for your help.

James

User avatar
brucedenney
Site Admin
Site Admin
Posts: 4619
Joined: 28 Feb 2006, 09:56
Sage Version: v28 UK/Europe/Africa

Re: Selected Courier Hyperlink with Consignment No

Post by brucedenney » 15 Mar 2018, 21:11

I would create some JPGs that were all the same size for the logos, call them 1.jpg 2.jpg and so on and put them in a suitable location, (could even be on the web I guess).

The formula for the image is then is then "c:\\path\\to\\the\\file\\"+courier_no+".jpg"

Note the slashes are double because slash is a special character and so needs escaping.
For just about anything Sage :- Discount subscriptions, pay-as-you-go support, application integration, reports, layouts, linked excel spreadsheets, analysis or any other help making life with sage easier/less time consuming Contact me.

nsa100
User
User
Posts: 5
Joined: 14 Mar 2018, 20:39
Sage Version: v2018 24 UK/Europe/Africa

Re: Selected Courier Hyperlink with Consignment No

Post by nsa100 » 16 Mar 2018, 14:41

Hello Bruce

Again you are great!

Many thanks for your help.

James

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 14 guests