How to update integer field using 'updatetablebuffer'?

BTW the database is SQL -- don't know if that's a factor...

I've tried some things like that but will definitely try the quotes.

Thanks for your input.

Frank

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of John Driggers
Sent: Wednesday, January 11, 2012 4:23 PM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] How to update integer field using 'updatetablebuffer'??

Try wrapping the values in single quotes.
Progress can be kind of odd about this when you're calling outside
libraries. It's not terribly unusual to find situations where variables
need to be placed in quotes.

If it still fails, let me know and I'll try to run some tests on my end for
you.

On Wed, Jan 11, 2012 at 1:34 PM, DeCarmine, Frank <
frank.decarmine@...> wrote:

> **
>
>
> Thanks, John.
>
> Actually the word "integer(lead)" in the fourth test is NOT in my code --
> just one of the various tests I was trying. Strike the word "integer" and
> the parentheses...
>
> When I TEST for the integer values but UPDATE a varchar() field the
> varchar() fields are updated, so I believe the conditions are properly
> evaluating.
>
> If I manually set an integer field in question to a non-zero value and run
> the configurator to update a varchar() field the update does NOT take place
> -- the test for 0 fails -- but when I reset that field to 0 the update DOES
> take place
>
> I've tried unconditional updates with similar results -- the varchar()
> fields update but the integer fields do not.
>
> Previous similar configurator issues -- fields would not update when using
> variables but hardcoded fields would -- were resolved when another user at
> Perspectives told me "Everyone knows that doesn't work. You have to upgrade
> to the next version of Vantage"
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of John Driggers
> Sent: Wednesday, January 11, 2012 1:08 PM
> To: vantage@yahoogroups.com
> Subject: Re: [Vantage] How to update integer field using
> 'updatetablebuffer'??
>
> Your code looks ok to me.
>
> Are you sure it's your conditions are evaluating the way you expect?
> If not, try sticking some message boxes in there or put your
> updatetablebuffer outside of the if statements to make sure it is
> everything works as you expect.
>
> On Wed, Jan 11, 2012 at 12:46 PM, DeCarmine, Frank <
> frank.decarmine@...> wrote:
>
> > **
>
> >
> >
> > Hi,
> >
> > I'm a long-time lurker but first-time poster...
> >
> > I'm on Vantage 8.03.406A and a long-time Product Configurator developer.
> >
> > I'm trying to update four fields (daysofsupply, buyerID, vendornum, and
> > leadtime) in the PartPlant table using 'UpdateTableBuffer' with the
> > following code:
> >
> > find partplant where partplant.partnum = P01_chr_ProductNumber
> > and partplant.daysofsupply = 0
> > and partplant.plant = 'MfgSys' no-lock no-error.
> > if available partplant then run lib\updatetablebuffer.p(input BUFFER
> > partplant:HANDLE, 'daysofsupply',days).
> >
> > find partplant where partplant.partnum = P01_chr_ProductNumber
> > and partplant.vendornum = 0
> > and partplant.plant = 'MfgSys' no-lock no-error.
> > if available partplant then run lib\updatetablebuffer.p(input BUFFER
> > partplant:HANDLE, 'vendornum',vendor).
> >
> > find partplant where partplant.partnum = P01_chr_ProductNumber
> > and partplant.buyerid = ''
> > and partplant.plant = 'MfgSys' no-lock no-error.
> > if available partplant then run lib\updatetablebuffer.p(input BUFFER
> > partplant:HANDLE, 'buyerid',buyer).
> >
> > find partplant where partplant.partnum = P01_chr_ProductNumber
> > and partplant.leadtime = 0
> > and partplant.plant = 'MfgSys' no-lock no-error.
> > if available partplant then run lib\updatetablebuffer.p(input BUFFER
> > partplant:HANDLE, 'leadtime',integer(lead)).
> >
> > Since I only want to update these fields if the current values are 0 or
> > the buyerID is blank, I needed to test for each condition, hence similar
> > code executed four times...
> >
> > P01_chr_ProductNumber is determined via combo-box selections and
> variables
> > days, vendor, buyer, and lead are read from an external file.
> >
> > THE PROBLEM:
> > The code only seems to work for the varchar() field (buyerID). I've tried
> > using variables (as in code above) and (for test purposes) hard-coding
> > integer values for the other fields but cannot get the code to work.
> >
> > To test my selection rules I tested for the integer fields but updated
> > different varchar() fields and code works fine...
> >
> > Any suggestions?
> >
> > Thanks.
> >
> > Frank
> >
> > __________________________________________________________
> > This email has been scanned by the MessageLabs
> > outbound Email Security System for CIRCOR International Inc.
> > For more information please visit http://www.symanteccloud.com
> > __________________________________________________________
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
>
> --
> *John Driggers*
> *High End Dev, System Design, Profit Drinking
> *
> *:: 904.962.2887*
> *:: waffqle@...*
> *:: NO FAXES*
>
> *
>
>
> *
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
> __________________________________________________________
> This email has been scanned by the MessageLabs inbound
>
> Email Security System for CIRCOR International Inc.
> For more information please visit http://www.symanteccloud.com
> __________________________________________________________
>
> __________________________________________________________
> This email has been scanned by the MessageLabs
> outbound Email Security System for CIRCOR International Inc.
> For more information please visit http://www.symanteccloud.com
> __________________________________________________________
>
>
>



--
*John Driggers*
*High End Dev, System Design, Profit Drinking
*
*:: 904.962.2887*
*:: waffqle@...*
*:: NO FAXES*

*

*


[Non-text portions of this message have been removed]



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links




______________________________________________________________________
This email has been scanned by the MessageLabs inbound
Email Security System for CIRCOR International Inc.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs
outbound Email Security System for CIRCOR International Inc.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
Hi,

I'm a long-time lurker but first-time poster...

I'm on Vantage 8.03.406A and a long-time Product Configurator developer.

I'm trying to update four fields (daysofsupply, buyerID, vendornum, and leadtime) in the PartPlant table using 'UpdateTableBuffer' with the following code:

find partplant where partplant.partnum = P01_chr_ProductNumber
and partplant.daysofsupply = 0
and partplant.plant = 'MfgSys' no-lock no-error.
if available partplant then run lib\updatetablebuffer.p(input BUFFER partplant:HANDLE, 'daysofsupply',days).

find partplant where partplant.partnum = P01_chr_ProductNumber
and partplant.vendornum = 0
and partplant.plant = 'MfgSys' no-lock no-error.
if available partplant then run lib\updatetablebuffer.p(input BUFFER partplant:HANDLE, 'vendornum',vendor).

find partplant where partplant.partnum = P01_chr_ProductNumber
and partplant.buyerid = ''
and partplant.plant = 'MfgSys' no-lock no-error.
if available partplant then run lib\updatetablebuffer.p(input BUFFER partplant:HANDLE, 'buyerid',buyer).

find partplant where partplant.partnum = P01_chr_ProductNumber
and partplant.leadtime = 0
and partplant.plant = 'MfgSys' no-lock no-error.
if available partplant then run lib\updatetablebuffer.p(input BUFFER partplant:HANDLE, 'leadtime',integer(lead)).

Since I only want to update these fields if the current values are 0 or the buyerID is blank, I needed to test for each condition, hence similar code executed four times...

P01_chr_ProductNumber is determined via combo-box selections and variables days, vendor, buyer, and lead are read from an external file.

THE PROBLEM:
The code only seems to work for the varchar() field (buyerID). I've tried using variables (as in code above) and (for test purposes) hard-coding integer values for the other fields but cannot get the code to work.

To test my selection rules I tested for the integer fields but updated different varchar() fields and code works fine...

Any suggestions?

Thanks.

Frank



______________________________________________________________________
This email has been scanned by the MessageLabs
outbound Email Security System for CIRCOR International Inc.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

[Non-text portions of this message have been removed]
Your code looks ok to me.

Are you sure it's your conditions are evaluating the way you expect?
If not, try sticking some message boxes in there or put your
updatetablebuffer outside of the if statements to make sure it is
everything works as you expect.



On Wed, Jan 11, 2012 at 12:46 PM, DeCarmine, Frank <
frank.decarmine@...> wrote:

> **
>
>
> Hi,
>
> I'm a long-time lurker but first-time poster...
>
> I'm on Vantage 8.03.406A and a long-time Product Configurator developer.
>
> I'm trying to update four fields (daysofsupply, buyerID, vendornum, and
> leadtime) in the PartPlant table using 'UpdateTableBuffer' with the
> following code:
>
> find partplant where partplant.partnum = P01_chr_ProductNumber
> and partplant.daysofsupply = 0
> and partplant.plant = 'MfgSys' no-lock no-error.
> if available partplant then run lib\updatetablebuffer.p(input BUFFER
> partplant:HANDLE, 'daysofsupply',days).
>
> find partplant where partplant.partnum = P01_chr_ProductNumber
> and partplant.vendornum = 0
> and partplant.plant = 'MfgSys' no-lock no-error.
> if available partplant then run lib\updatetablebuffer.p(input BUFFER
> partplant:HANDLE, 'vendornum',vendor).
>
> find partplant where partplant.partnum = P01_chr_ProductNumber
> and partplant.buyerid = ''
> and partplant.plant = 'MfgSys' no-lock no-error.
> if available partplant then run lib\updatetablebuffer.p(input BUFFER
> partplant:HANDLE, 'buyerid',buyer).
>
> find partplant where partplant.partnum = P01_chr_ProductNumber
> and partplant.leadtime = 0
> and partplant.plant = 'MfgSys' no-lock no-error.
> if available partplant then run lib\updatetablebuffer.p(input BUFFER
> partplant:HANDLE, 'leadtime',integer(lead)).
>
> Since I only want to update these fields if the current values are 0 or
> the buyerID is blank, I needed to test for each condition, hence similar
> code executed four times...
>
> P01_chr_ProductNumber is determined via combo-box selections and variables
> days, vendor, buyer, and lead are read from an external file.
>
> THE PROBLEM:
> The code only seems to work for the varchar() field (buyerID). I've tried
> using variables (as in code above) and (for test purposes) hard-coding
> integer values for the other fields but cannot get the code to work.
>
> To test my selection rules I tested for the integer fields but updated
> different varchar() fields and code works fine...
>
> Any suggestions?
>
> Thanks.
>
> Frank
>
> __________________________________________________________
> This email has been scanned by the MessageLabs
> outbound Email Security System for CIRCOR International Inc.
> For more information please visit http://www.symanteccloud.com
> __________________________________________________________
>
> [Non-text portions of this message have been removed]
>
>
>



--
*John Driggers*
*High End Dev, System Design, Profit Drinking
*
*:: 904.962.2887*
*:: waffqle@...*
*:: NO FAXES*

*

*


[Non-text portions of this message have been removed]
Thanks, John.

Actually the word "integer(lead)" in the fourth test is NOT in my code -- just one of the various tests I was trying. Strike the word "integer" and the parentheses...

When I TEST for the integer values but UPDATE a varchar() field the varchar() fields are updated, so I believe the conditions are properly evaluating.

If I manually set an integer field in question to a non-zero value and run the configurator to update a varchar() field the update does NOT take place -- the test for 0 fails -- but when I reset that field to 0 the update DOES take place

I've tried unconditional updates with similar results -- the varchar() fields update but the integer fields do not.

Previous similar configurator issues -- fields would not update when using variables but hardcoded fields would -- were resolved when another user at Perspectives told me "Everyone knows that doesn't work. You have to upgrade to the next version of Vantage"

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of John Driggers
Sent: Wednesday, January 11, 2012 1:08 PM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] How to update integer field using 'updatetablebuffer'??

Your code looks ok to me.

Are you sure it's your conditions are evaluating the way you expect?
If not, try sticking some message boxes in there or put your
updatetablebuffer outside of the if statements to make sure it is
everything works as you expect.



On Wed, Jan 11, 2012 at 12:46 PM, DeCarmine, Frank <
frank.decarmine@...> wrote:

> **
>
>
> Hi,
>
> I'm a long-time lurker but first-time poster...
>
> I'm on Vantage 8.03.406A and a long-time Product Configurator developer.
>
> I'm trying to update four fields (daysofsupply, buyerID, vendornum, and
> leadtime) in the PartPlant table using 'UpdateTableBuffer' with the
> following code:
>
> find partplant where partplant.partnum = P01_chr_ProductNumber
> and partplant.daysofsupply = 0
> and partplant.plant = 'MfgSys' no-lock no-error.
> if available partplant then run lib\updatetablebuffer.p(input BUFFER
> partplant:HANDLE, 'daysofsupply',days).
>
> find partplant where partplant.partnum = P01_chr_ProductNumber
> and partplant.vendornum = 0
> and partplant.plant = 'MfgSys' no-lock no-error.
> if available partplant then run lib\updatetablebuffer.p(input BUFFER
> partplant:HANDLE, 'vendornum',vendor).
>
> find partplant where partplant.partnum = P01_chr_ProductNumber
> and partplant.buyerid = ''
> and partplant.plant = 'MfgSys' no-lock no-error.
> if available partplant then run lib\updatetablebuffer.p(input BUFFER
> partplant:HANDLE, 'buyerid',buyer).
>
> find partplant where partplant.partnum = P01_chr_ProductNumber
> and partplant.leadtime = 0
> and partplant.plant = 'MfgSys' no-lock no-error.
> if available partplant then run lib\updatetablebuffer.p(input BUFFER
> partplant:HANDLE, 'leadtime',integer(lead)).
>
> Since I only want to update these fields if the current values are 0 or
> the buyerID is blank, I needed to test for each condition, hence similar
> code executed four times...
>
> P01_chr_ProductNumber is determined via combo-box selections and variables
> days, vendor, buyer, and lead are read from an external file.
>
> THE PROBLEM:
> The code only seems to work for the varchar() field (buyerID). I've tried
> using variables (as in code above) and (for test purposes) hard-coding
> integer values for the other fields but cannot get the code to work.
>
> To test my selection rules I tested for the integer fields but updated
> different varchar() fields and code works fine...
>
> Any suggestions?
>
> Thanks.
>
> Frank
>
> __________________________________________________________
> This email has been scanned by the MessageLabs
> outbound Email Security System for CIRCOR International Inc.
> For more information please visit http://www.symanteccloud.com
> __________________________________________________________
>
> [Non-text portions of this message have been removed]
>
>
>



--
*John Driggers*
*High End Dev, System Design, Profit Drinking
*
*:: 904.962.2887*
*:: waffqle@...*
*:: NO FAXES*

*

*


[Non-text portions of this message have been removed]



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links




______________________________________________________________________
This email has been scanned by the MessageLabs inbound
Email Security System for CIRCOR International Inc.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs
outbound Email Security System for CIRCOR International Inc.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
Try wrapping the values in single quotes.
Progress can be kind of odd about this when you're calling outside
libraries. It's not terribly unusual to find situations where variables
need to be placed in quotes.

If it still fails, let me know and I'll try to run some tests on my end for
you.

On Wed, Jan 11, 2012 at 1:34 PM, DeCarmine, Frank <
frank.decarmine@...> wrote:

> **
>
>
> Thanks, John.
>
> Actually the word "integer(lead)" in the fourth test is NOT in my code --
> just one of the various tests I was trying. Strike the word "integer" and
> the parentheses...
>
> When I TEST for the integer values but UPDATE a varchar() field the
> varchar() fields are updated, so I believe the conditions are properly
> evaluating.
>
> If I manually set an integer field in question to a non-zero value and run
> the configurator to update a varchar() field the update does NOT take place
> -- the test for 0 fails -- but when I reset that field to 0 the update DOES
> take place
>
> I've tried unconditional updates with similar results -- the varchar()
> fields update but the integer fields do not.
>
> Previous similar configurator issues -- fields would not update when using
> variables but hardcoded fields would -- were resolved when another user at
> Perspectives told me "Everyone knows that doesn't work. You have to upgrade
> to the next version of Vantage"
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of John Driggers
> Sent: Wednesday, January 11, 2012 1:08 PM
> To: vantage@yahoogroups.com
> Subject: Re: [Vantage] How to update integer field using
> 'updatetablebuffer'??
>
> Your code looks ok to me.
>
> Are you sure it's your conditions are evaluating the way you expect?
> If not, try sticking some message boxes in there or put your
> updatetablebuffer outside of the if statements to make sure it is
> everything works as you expect.
>
> On Wed, Jan 11, 2012 at 12:46 PM, DeCarmine, Frank <
> frank.decarmine@...> wrote:
>
> > **
>
> >
> >
> > Hi,
> >
> > I'm a long-time lurker but first-time poster...
> >
> > I'm on Vantage 8.03.406A and a long-time Product Configurator developer.
> >
> > I'm trying to update four fields (daysofsupply, buyerID, vendornum, and
> > leadtime) in the PartPlant table using 'UpdateTableBuffer' with the
> > following code:
> >
> > find partplant where partplant.partnum = P01_chr_ProductNumber
> > and partplant.daysofsupply = 0
> > and partplant.plant = 'MfgSys' no-lock no-error.
> > if available partplant then run lib\updatetablebuffer.p(input BUFFER
> > partplant:HANDLE, 'daysofsupply',days).
> >
> > find partplant where partplant.partnum = P01_chr_ProductNumber
> > and partplant.vendornum = 0
> > and partplant.plant = 'MfgSys' no-lock no-error.
> > if available partplant then run lib\updatetablebuffer.p(input BUFFER
> > partplant:HANDLE, 'vendornum',vendor).
> >
> > find partplant where partplant.partnum = P01_chr_ProductNumber
> > and partplant.buyerid = ''
> > and partplant.plant = 'MfgSys' no-lock no-error.
> > if available partplant then run lib\updatetablebuffer.p(input BUFFER
> > partplant:HANDLE, 'buyerid',buyer).
> >
> > find partplant where partplant.partnum = P01_chr_ProductNumber
> > and partplant.leadtime = 0
> > and partplant.plant = 'MfgSys' no-lock no-error.
> > if available partplant then run lib\updatetablebuffer.p(input BUFFER
> > partplant:HANDLE, 'leadtime',integer(lead)).
> >
> > Since I only want to update these fields if the current values are 0 or
> > the buyerID is blank, I needed to test for each condition, hence similar
> > code executed four times...
> >
> > P01_chr_ProductNumber is determined via combo-box selections and
> variables
> > days, vendor, buyer, and lead are read from an external file.
> >
> > THE PROBLEM:
> > The code only seems to work for the varchar() field (buyerID). I've tried
> > using variables (as in code above) and (for test purposes) hard-coding
> > integer values for the other fields but cannot get the code to work.
> >
> > To test my selection rules I tested for the integer fields but updated
> > different varchar() fields and code works fine...
> >
> > Any suggestions?
> >
> > Thanks.
> >
> > Frank
> >
> > __________________________________________________________
> > This email has been scanned by the MessageLabs
> > outbound Email Security System for CIRCOR International Inc.
> > For more information please visit http://www.symanteccloud.com
> > __________________________________________________________
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
>
> --
> *John Driggers*
> *High End Dev, System Design, Profit Drinking
> *
> *:: 904.962.2887*
> *:: waffqle@...*
> *:: NO FAXES*
>
> *
>
>
> *
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
> __________________________________________________________
> This email has been scanned by the MessageLabs inbound
>
> Email Security System for CIRCOR International Inc.
> For more information please visit http://www.symanteccloud.com
> __________________________________________________________
>
> __________________________________________________________
> This email has been scanned by the MessageLabs
> outbound Email Security System for CIRCOR International Inc.
> For more information please visit http://www.symanteccloud.com
> __________________________________________________________
>
>
>



--
*John Driggers*
*High End Dev, System Design, Profit Drinking
*
*:: 904.962.2887*
*:: waffqle@...*
*:: NO FAXES*

*

*


[Non-text portions of this message have been removed]