In your log where you output... add
<cfif trim(a) is "">NA<cfelse>#A#</cfif>
If you want to write it just once instead of for each field, evaluate the
var name... A,B,C, etc.
Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100
Hauppauge NY 11788
P : 631.231.6600 Ext. 119
F : 631.434.7022
http://www.austin-williams.com
Great advertising can't be either/or. It must be &.
Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged
-----Original Message-----
From: Jason Congerton [mailto:[email protected]]
Sent: Wednesday, November 11, 2009 10:22 AM
To: cf-talk
Subject: Compare records and update
Hi
I have a table which stores measurements, the measurements have a
corresponding letter assoiciated with them i.e A = 0.34 B = 0.35 etc.
Measurements are directly related to the productPart table. The productPart
table stores part no info relating to the product and measurements.
One product main contain 1 or multiple part no's i.e
Product: UFC-SLOTTED
Part No: 21U, 22U, 23U, 24U
Each part number has it's own set of measurments i.e
Part No: 21U
Measurements: A=0.23, B=0.34, C=0.23
Part No: 22U
Measurements: A=0.23, B=0.34, C=0.23, D=0.45, E=0.46
As you can see the part numbers can use a varying amount of measurments,
which is where my question comes.
Part No: 21U has 3 measurments; A,B,C
Part No: 22U has 5 measuremnts; A,B,C,D,E
I need to fill the gaps automatically to produce the following and place NA
or a null value.
Part No: 21U
Measurements: A=0.23, B=0.34, C=0.23, D=NA, E=NA,
Part No: 22U
Measurements: A=0.23, B=0.34, C=0.23, D=0.45, E=0.46
Once the user has completed inserting the measurements for the part no, i
will offer a button to finalise product insert.
I know i will need to loop around the the measurement table for each part
no, but how do i know when to insert the correct title(i.e D) and the null
value, what if statment will i use, i'm sure it must
be possible. Table structure below;
productPart
productPartID(uid), partNo, lamNo
measurement
mID(uid),mPartID(link to productPart), mTitle, measOne
Thanks
Jason
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328270
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4