Page 1 of 1

Jumpstart - Issues with #for each key field

Posted: Fri Aug 11, 2017 10:46 am
by sherimc
Hello,

I have my templates working prior to updating to version 5.10.1. This piece of code below worked in 5.9.1 and I don't understand why now this is not working. A programmer came to me asking yesterday why I don't build the WHERE clause and when I looked I do, but its just not seeing a "key".

We have Sql Tables and they all have a Primary Key, which is what I want to build. Is there something I am missing?

#for each key field
#if #first
getString += ' where #dbfield = ?'; // add WHERE clause
#else
getString += ' and #dbfield = ?';
#endif
#endfor

This is the snippet of the source code of the table I am putting into Jumpstart to use.

Create Table SO_Order_Header For System Name SoOMH01T

(
-- Captured with the order and will be used, without exception, with each shipment

SoOMH01T_ID for column SoOMH01TID BigInt Generated Always As Identity
(Start With 1, Increment By 1, No MinValue, No MaxValue, No Cycle, Order, Cache 20),

SoOrdSrT_ID For Column SoOrdSrTID BigInt Default Null -- Order Source
,SoOrdStT_ID For Column SoOrdStTID BigInt Not Null -- Order Status
,SoOrdTyT_ID For Column SoOrdTyTID BigInt Not Null -- Order Type