Update Company.Number05 field from different company

Thank you Chris for the help.



________________________________
From: Christopher Heins <cheins@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Friday, February 3, 2012 10:08 AM
Subject: [Vantage] Re: Update Company.Number05 field from different company

YEAR is a function which requires a date argument, e.g. YEAR(TODAY) returns 2012 as an integer. When the compiler sees year without an argument it tries to find it as a field in one of the records in scope. Failing that, you get the error message.

To get the "12" you are looking for you could try:

<charFld> = substring(string(today,"999999"),5,2).

since string(today,"999999") returns MMDDYY as a character string. Or use "99999999" to get MMDDYYYY.

You can debug this stuff with message statements, which will echo into the appserver server.log (in epicorlogs folder):

message "Testing 2 digit Year: " + substring(string(year(today)),3,2).

Results in:

[12/02/03@09:56:28.176-0500] P-006212 T-005572 1 AS -- (Procedure: 'pny/4glcall.p' Line:1345) Testing 2 digit Year: 12

I used STRING(YEAR(TODAY)) instead of STRING(TODAY,"999999") but either would work. Just be sure to adjust your substring starting position and length .

[This entire discussion ignores the SESSION:DATE-FORMAT parameter which determines MDY vs. DMY format of dates). YEAR(TODAY) would work regardless of the SESSION:DATE-FORMAT setting but STRING(TODAY,...) would break!]

Note if you are using a date field (which might be null) instead of TODAY you should conditionalize your test ... assuming ttorderhed.ReqDate ... along these lines ...

If ttorderhed.ReqDate <> ?
then assign ttorderhed.shortchar05 = substring(string(year(ttorderhed.ReqDate)),3,2).
Else return error "You must specify a ReqDate".

Happy Coding!

Chris

Christopher Heins
Sr. Progress Programmer/Analyst
[cid:image001.png@01CCE259.E1FF1860]
Desk# 973-560-5370
 Cell# 908-256-3662
Skype: cheins.nj
cheins@...<mailto:cheins@...>


________________________________
NOT INTENDED AS A SUBSTITUTE FOR A WRITING
NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO, SHALL CONSTITUTE A BINDING CONTRACT, OR ANY CONTRACTUAL OBLIGATION BY PNY, OR ANY INTENT TO ENTER INTO ANY BINDING OBLIGATIONS, NOTWITHSTANDING ANY ENACTMENT OF THE UNIFORM ELECTRONIC TRANSACTIONS ACT, THE FEDERAL E-SIGN ACT, OR ANY OTHER STATE OR FEDERAL LAW OF SIMILAR SUBSTANCE OR EFFECT. THIS EMAIL MESSAGE, ITS CONTENTS AND ATTACHMENTS ARE NOT INTENDED TO REPRESENT AN OFFER OR ACCEPTANCE OF AN OFFER TO ENTER INTO A CONTRACT. NOTHING IN THIS E-MAIL, IN ANY E-MAIL THREAD OF WHICH IT MAY BE A PART, OR IN ANY ATTACHMENTS THERETO SHALL ALTER THIS DISCLAIMER.

This e-mail message from PNY Technologies, Inc. is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.


[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/.%c2%a0
(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



[Non-text portions of this message have been removed]
I am trying to update the Number05 field which is in a different company from the one I am in. I have code that works if updating in the current comapny (100), but fails if trying from company (100) to update Number05 in company (110). Any ideas what I'm missing? I think it has to do with the Session I am getting. Thanks for any help.

Private Function GetNextKeyD3() As String
'//Use the company Adapter to Store our sequance number Number01
Dim co as company = nothing
co = new company(ProjectEntryForm.Session.ConnectionPool)
Dim cds as companydataset = co.GetByID("110")

Dim nextKey As String = String.Empty

Try
nextKey = cds.Company.Rows(0)("Number05").toString()
cds.Company.Rows(0).BeginEdit()
cds.Company.Rows(0)("Number05") += 1
cds.Company.Rows(0)("Character01") = todayDate
cds.Company.Rows(0).EndEdit()
co.Update(cds)
Catch ex As exception
MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Exclamation)
End Try
'messagebox.show("nextKey = " & nextKey)
return nextKey
End Function
Why not try using 4GL code from within a BPM? 4GL code really doesn't care
what company you're in - it's just seeing these as progress tables.



Kevin Simon



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
tkoch77
Sent: Thursday, February 02, 2012 2:37 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Update Company.Number05 field from different company





I am trying to update the Number05 field which is in a different company
from the one I am in. I have code that works if updating in the current
comapny (100), but fails if trying from company (100) to update Number05 in
company (110). Any ideas what I'm missing? I think it has to do with the
Session I am getting. Thanks for any help.

Private Function GetNextKeyD3() As String
'//Use the company Adapter to Store our sequance number Number01
Dim co as company = nothing
co = new company(ProjectEntryForm.Session.ConnectionPool)
Dim cds as companydataset = co.GetByID("110")

Dim nextKey As String = String.Empty

Try
nextKey = cds.Company.Rows(0)("Number05").toString()
cds.Company.Rows(0).BeginEdit()
cds.Company.Rows(0)("Number05") += 1
cds.Company.Rows(0)("Character01") = todayDate
cds.Company.Rows(0).EndEdit()
co.Update(cds)
Catch ex As exception
MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
mation)
End Try
'messagebox.show("nextKey = " & nextKey)
return nextKey
End Function





[Non-text portions of this message have been removed]
I would but it is more involved than just updating the fields. I'm using this with project entry. When a user chooses new project, a popup window displays with a combobox showing the company names. They choose a company and an ID is generated. Ex: 12-A-0001. 12 is the year, A corresponds to the company they chose (could also be B or C also depending on which company they selected), and 0001 is the incrementing number. So if they choose company (110) which would equal 11-B-0001 as the ID let's say, I would want it to increment the number05 field for company (110). Hope that makes sense.



________________________________
From: Kevin Simon <simstrak@...>
To: vantage@yahoogroups.com
Sent: Thursday, February 2, 2012 3:11 PM
Subject: RE: [Vantage] Update Company.Number05 field from different company

Why not try using 4GL code from within a BPM? 4GL code really doesn't care
what company you're in - it's just seeing these as progress tables.



Kevin Simon



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
tkoch77
Sent: Thursday, February 02, 2012 2:37 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Update Company.Number05 field from different company



Â

I am trying to update the Number05 field which is in a different company
from the one I am in. I have code that works if updating in the current
comapny (100), but fails if trying from company (100) to update Number05 in
company (110). Any ideas what I'm missing? I think it has to do with the
Session I am getting. Thanks for any help.

Private Function GetNextKeyD3() As String
'//Use the company Adapter to Store our sequance number Number01
Dim co as company = nothing
co = new company(ProjectEntryForm.Session.ConnectionPool)
Dim cds as companydataset = co.GetByID("110")

Dim nextKey As String = String.Empty

Try
nextKey = cds.Company.Rows(0)("Number05").toString()
cds.Company.Rows(0).BeginEdit()
cds.Company.Rows(0)("Number05") += 1
cds.Company.Rows(0)("Character01") = todayDate
cds.Company.Rows(0).EndEdit()
co.Update(cds)
Catch ex As exception
MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
mation)
End Try
'messagebox.show("nextKey = " & nextKey)
return nextKey
End Function





[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/.%c2%a0
(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



[Non-text portions of this message have been removed]
are you on 9, in 9 you can have the BPM popup an input form or you can pass the information via the contextBPM Dataset to the BPM after they make their choice.

Jim Kinneman
Senior Consultant
Encompass Solution, Inc

--- In vantage@yahoogroups.com, Ted Koch <tkoch77@...> wrote:
>
> I would but it is more involved than just updating the fields. I'm using this with project entry. When a user chooses new project, a popup window displays with a combobox showing the company names. They choose a company and an ID is generated. Ex: 12-A-0001. 12 is the year, A corresponds to the company they chose (could also be B or C also depending on which company they selected), and 0001 is the incrementing number. So if they choose company (110) which would equal 11-B-0001 as the ID let's say, I would want it to increment the number05 field for company (110). Hope that makes sense.
>
>
>
> ________________________________
> From: Kevin Simon <simstrak@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, February 2, 2012 3:11 PM
> Subject: RE: [Vantage] Update Company.Number05 field from different company
>
> Why not try using 4GL code from within a BPM? 4GL code really doesn't care
> what company you're in - it's just seeing these as progress tables.
>
>
>
> Kevin Simon
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> tkoch77
> Sent: Thursday, February 02, 2012 2:37 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Update Company.Number05 field from different company
>
>
>
> Â
>
> I am trying to update the Number05 field which is in a different company
> from the one I am in. I have code that works if updating in the current
> comapny (100), but fails if trying from company (100) to update Number05 in
> company (110). Any ideas what I'm missing? I think it has to do with the
> Session I am getting. Thanks for any help.
>
> Private Function GetNextKeyD3() As String
> '//Use the company Adapter to Store our sequance number Number01
> Dim co as company = nothing
> co = new company(ProjectEntryForm.Session.ConnectionPool)
> Dim cds as companydataset = co.GetByID("110")
>
> Dim nextKey As String = String.Empty
>
> Try
> nextKey = cds.Company.Rows(0)("Number05").toString()
> cds.Company.Rows(0).BeginEdit()
> cds.Company.Rows(0)("Number05") += 1
> cds.Company.Rows(0)("Character01") = todayDate
> cds.Company.Rows(0).EndEdit()
> co.Update(cds)
> Catch ex As exception
> MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> mation)
> End Try
> 'messagebox.show("nextKey = " & nextKey)
> return nextKey
> End Function
>
>
>
>
>
> [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/.%c2%a0
> (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
>
>
>
> [Non-text portions of this message have been removed]
>
Yes, 9.05.606A



________________________________
From: jckinneman <jckinneman@...>
To: vantage@yahoogroups.com
Sent: Thursday, February 2, 2012 4:30 PM
Subject: [Vantage] Re: Update Company.Number05 field from different company

are you on 9, in 9 you can have the BPM popup an input form or you can pass the information via the contextBPM Dataset to the BPM after they make their choice.

Jim Kinneman
Senior Consultant
Encompass Solution, Inc

--- In vantage@yahoogroups.com, Ted Koch <tkoch77@...> wrote:
>
> I would but it is more involved than just updating the fields. I'm using this with project entry. When a user chooses new project, a popup window displays with a combobox showing the company names. They choose a company and an ID is generated. Ex: 12-A-0001. 12 is the year, A corresponds to the company they chose (could also be B or C also depending on which company they selected), and 0001 is the incrementing number. So if they choose company (110) which would equal 11-B-0001 as the ID let's say, I would want it to increment the number05 field for company (110). Hope that makes sense.
>
>
>
> ________________________________
>Â From: Kevin Simon <simstrak@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, February 2, 2012 3:11 PM
> Subject: RE: [Vantage] Update Company.Number05 field from different company

> Why not try using 4GL code from within a BPM? 4GL code really doesn't care
> what company you're in - it's just seeing these as progress tables.
>
>
>
> Kevin Simon
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> tkoch77
> Sent: Thursday, February 02, 2012 2:37 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Update Company.Number05 field from different company
>
>
>
> Â
>
> I am trying to update the Number05 field which is in a different company
> from the one I am in. I have code that works if updating in the current
> comapny (100), but fails if trying from company (100) to update Number05 in
> company (110). Any ideas what I'm missing? I think it has to do with the
> Session I am getting. Thanks for any help.
>
> Private Function GetNextKeyD3() As String
> '//Use the company Adapter to Store our sequance number Number01
> Dim co as company = nothing
> co = new company(ProjectEntryForm.Session.ConnectionPool)
> Dim cds as companydataset = co.GetByID("110")
>
> Dim nextKey As String = String.Empty
>
> Try
> nextKey = cds.Company.Rows(0)("Number05").toString()
> cds.Company.Rows(0).BeginEdit()
> cds.Company.Rows(0)("Number05") += 1
> cds.Company.Rows(0)("Character01") = todayDate
> cds.Company.Rows(0).EndEdit()
> co.Update(cds)
> Catch ex As exception
> MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> mation)
> End Try
> 'messagebox.show("nextKey = " & nextKey)
> return nextKey
> End Function
>
>
>
>
>
> [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/.%c2%a0
> (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
>
>
>
> [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/.%c2%a0
(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



[Non-text portions of this message have been removed]
I have the form popping up via pre-processing on the GetNewProject method and then was assigning Project.Character05 this value in post-processing and then using character05 it in my .net code



________________________________
From: jckinneman <jckinneman@...>
To: vantage@yahoogroups.com
Sent: Thursday, February 2, 2012 4:30 PM
Subject: [Vantage] Re: Update Company.Number05 field from different company

are you on 9, in 9 you can have the BPM popup an input form or you can pass the information via the contextBPM Dataset to the BPM after they make their choice.

Jim Kinneman
Senior Consultant
Encompass Solution, Inc

--- In vantage@yahoogroups.com, Ted Koch <tkoch77@...> wrote:
>
> I would but it is more involved than just updating the fields. I'm using this with project entry. When a user chooses new project, a popup window displays with a combobox showing the company names. They choose a company and an ID is generated. Ex: 12-A-0001. 12 is the year, A corresponds to the company they chose (could also be B or C also depending on which company they selected), and 0001 is the incrementing number. So if they choose company (110) which would equal 11-B-0001 as the ID let's say, I would want it to increment the number05 field for company (110). Hope that makes sense.
>
>
>
> ________________________________
>Â From: Kevin Simon <simstrak@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, February 2, 2012 3:11 PM
> Subject: RE: [Vantage] Update Company.Number05 field from different company

> Why not try using 4GL code from within a BPM? 4GL code really doesn't care
> what company you're in - it's just seeing these as progress tables.
>
>
>
> Kevin Simon
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> tkoch77
> Sent: Thursday, February 02, 2012 2:37 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Update Company.Number05 field from different company
>
>
>
> Â
>
> I am trying to update the Number05 field which is in a different company
> from the one I am in. I have code that works if updating in the current
> comapny (100), but fails if trying from company (100) to update Number05 in
> company (110). Any ideas what I'm missing? I think it has to do with the
> Session I am getting. Thanks for any help.
>
> Private Function GetNextKeyD3() As String
> '//Use the company Adapter to Store our sequance number Number01
> Dim co as company = nothing
> co = new company(ProjectEntryForm.Session.ConnectionPool)
> Dim cds as companydataset = co.GetByID("110")
>
> Dim nextKey As String = String.Empty
>
> Try
> nextKey = cds.Company.Rows(0)("Number05").toString()
> cds.Company.Rows(0).BeginEdit()
> cds.Company.Rows(0)("Number05") += 1
> cds.Company.Rows(0)("Character01") = todayDate
> cds.Company.Rows(0).EndEdit()
> co.Update(cds)
> Catch ex As exception
> MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> mation)
> End Try
> 'messagebox.show("nextKey = " & nextKey)
> return nextKey
> End Function
>
>
>
>
>
> [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/.%c2%a0
> (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
>
>
>
> [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/.%c2%a0
(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



[Non-text portions of this message have been removed]
are you popping up during embedded(.net code) or during the BPM?

--- In vantage@yahoogroups.com, Ted Koch <tkoch77@...> wrote:
>
> I have the form popping up via pre-processing on the GetNewProject method and then was assigning Project.Character05 this value in post-processing and then using character05 it in my .net code
>
>
>
> ________________________________
> From: jckinneman <jckinneman@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, February 2, 2012 4:30 PM
> Subject: [Vantage] Re: Update Company.Number05 field from different company
>
> are you on 9, in 9 you can have the BPM popup an input form or you can pass the information via the contextBPM Dataset to the BPM after they make their choice.
>
> Jim Kinneman
> Senior Consultant
> Encompass Solution, Inc
>
> --- In vantage@yahoogroups.com, Ted Koch <tkoch77@> wrote:
> >
> > I would but it is more involved than just updating the fields. I'm using this with project entry. When a user chooses new project, a popup window displays with a combobox showing the company names. They choose a company and an ID is generated. Ex: 12-A-0001. 12 is the year, A corresponds to the company they chose (could also be B or C also depending on which company they selected), and 0001 is the incrementing number. So if they choose company (110) which would equal 11-B-0001 as the ID let's say, I would want it to increment the number05 field for company (110). Hope that makes sense.
> >
> >
> >
> > ________________________________
> >Â From: Kevin Simon <simstrak@>
> > To: vantage@yahoogroups.com
> > Sent: Thursday, February 2, 2012 3:11 PM
> > Subject: RE: [Vantage] Update Company.Number05 field from different company
> >Â
> > Why not try using 4GL code from within a BPM? 4GL code really doesn't care
> > what company you're in - it's just seeing these as progress tables.
> >
> >
> >
> > Kevin Simon
> >
> >
> >
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> > tkoch77
> > Sent: Thursday, February 02, 2012 2:37 PM
> > To: vantage@yahoogroups.com
> > Subject: [Vantage] Update Company.Number05 field from different company
> >
> >
> >
> > Â
> >
> > I am trying to update the Number05 field which is in a different company
> > from the one I am in. I have code that works if updating in the current
> > comapny (100), but fails if trying from company (100) to update Number05 in
> > company (110). Any ideas what I'm missing? I think it has to do with the
> > Session I am getting. Thanks for any help.
> >
> > Private Function GetNextKeyD3() As String
> > '//Use the company Adapter to Store our sequance number Number01
> > Dim co as company = nothing
> > co = new company(ProjectEntryForm.Session.ConnectionPool)
> > Dim cds as companydataset = co.GetByID("110")
> >
> > Dim nextKey As String = String.Empty
> >
> > Try
> > nextKey = cds.Company.Rows(0)("Number05").toString()
> > cds.Company.Rows(0).BeginEdit()
> > cds.Company.Rows(0)("Number05") += 1
> > cds.Company.Rows(0)("Character01") = todayDate
> > cds.Company.Rows(0).EndEdit()
> > co.Update(cds)
> > Catch ex As exception
> > MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> > mation)
> > End Try
> > 'messagebox.show("nextKey = " & nextKey)
> > return nextKey
> > End Function
> >
> >
> >
> >
> >
> > [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/.%c2%a0
> > (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
> >
> >
> >
> > [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/.%c2%a0
> (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
>
>
>
> [Non-text portions of this message have been removed]
>
Sorry, during BPM preprocessing on GetNewProject method. I think I just figured it out.


User clicks new project, bpm form comes up with list of companies. The user then select the company hits OK and the project.character05 field is populated with a value based on the choice from the bpm form. The project ID is then populated with a dummy number place holder. Then on pre-processing for project.update method, the condition checks if the field of the changed row is equal to the dummy number. then with ABL code I can assign the project ID similar to this.

for each ttproject.

If ttProject.Character05 = "110" Then

   for each company where company.com = "110".
   if available company then do:
     Â
      ttproject.ProjectID = string(company.Number05).
      company.Number05 = company.Number05 + 1.
  Â
   end.

end.

end.



________________________________
From: jckinneman <jckinneman@...>
To: vantage@yahoogroups.com
Sent: Thursday, February 2, 2012 4:49 PM
Subject: [Vantage] Re: Update Company.Number05 field from different company

are you popping up during embedded(.net code) or during the BPM?

--- In vantage@yahoogroups.com, Ted Koch <tkoch77@...> wrote:
>
> I have the form popping up via pre-processing on the GetNewProject method and then was assigning Project.Character05 this value in post-processing and then using character05 it in my .net code
>
>
>
> ________________________________
>Â From: jckinneman <jckinneman@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, February 2, 2012 4:30 PM
> Subject: [Vantage] Re: Update Company.Number05 field from different company

> are you on 9, in 9 you can have the BPM popup an input form or you can pass the information via the contextBPM Dataset to the BPM after they make their choice.
>
> Jim Kinneman
> Senior Consultant
> Encompass Solution, Inc
>
> --- In vantage@yahoogroups.com, Ted Koch <tkoch77@> wrote:
> >
> > I would but it is more involved than just updating the fields. I'm using this with project entry. When a user chooses new project, a popup window displays with a combobox showing the company names. They choose a company and an ID is generated. Ex: 12-A-0001. 12 is the year, A corresponds to the company they chose (could also be B or C also depending on which company they selected), and 0001 is the incrementing number. So if they choose company (110) which would equal 11-B-0001 as the ID let's say, I would want it to increment the number05 field for company (110). Hope that makes sense.
> >
> >
> >
> > ________________________________
> >Â From: Kevin Simon <simstrak@>
> > To: vantage@yahoogroups.com
> > Sent: Thursday, February 2, 2012 3:11 PM
> > Subject: RE: [Vantage] Update Company.Number05 field from different company
> >Â
> > Why not try using 4GL code from within a BPM? 4GL code really doesn't care
> > what company you're in - it's just seeing these as progress tables.
> >
> >
> >
> > Kevin Simon
> >
> >
> >
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> > tkoch77
> > Sent: Thursday, February 02, 2012 2:37 PM
> > To: vantage@yahoogroups.com
> > Subject: [Vantage] Update Company.Number05 field from different company
> >
> >
> >
> > Â
> >
> > I am trying to update the Number05 field which is in a different company
> > from the one I am in. I have code that works if updating in the current
> > comapny (100), but fails if trying from company (100) to update Number05 in
> > company (110). Any ideas what I'm missing? I think it has to do with the
> > Session I am getting. Thanks for any help.
> >
> > Private Function GetNextKeyD3() As String
> > '//Use the company Adapter to Store our sequance number Number01
> > Dim co as company = nothing
> > co = new company(ProjectEntryForm.Session.ConnectionPool)
> > Dim cds as companydataset = co.GetByID("110")
> >
> > Dim nextKey As String = String.Empty
> >
> > Try
> > nextKey = cds.Company.Rows(0)("Number05").toString()
> > cds.Company.Rows(0).BeginEdit()
> > cds.Company.Rows(0)("Number05") += 1
> > cds.Company.Rows(0)("Character01") = todayDate
> > cds.Company.Rows(0).EndEdit()
> > co.Update(cds)
> > Catch ex As exception
> > MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> > mation)
> > End Try
> > 'messagebox.show("nextKey = " & nextKey)
> > return nextKey
> > End Function
> >
> >
> >
> >
> >
> > [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/.%c2%a0
> > (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
> >
> >
> >
> > [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/.%c2%a0
> (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
>
>
>
> [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/.%c2%a0
(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



[Non-text portions of this message have been removed]
Any idea how to format and return the year to just 12 not 2012?



________________________________
From: jckinneman <jckinneman@...>
To: vantage@yahoogroups.com
Sent: Thursday, February 2, 2012 4:49 PM
Subject: [Vantage] Re: Update Company.Number05 field from different company

are you popping up during embedded(.net code) or during the BPM?

--- In vantage@yahoogroups.com, Ted Koch <tkoch77@...> wrote:
>
> I have the form popping up via pre-processing on the GetNewProject method and then was assigning Project.Character05 this value in post-processing and then using character05 it in my .net code
>
>
>
> ________________________________
>Â From: jckinneman <jckinneman@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, February 2, 2012 4:30 PM
> Subject: [Vantage] Re: Update Company.Number05 field from different company

> are you on 9, in 9 you can have the BPM popup an input form or you can pass the information via the contextBPM Dataset to the BPM after they make their choice.
>
> Jim Kinneman
> Senior Consultant
> Encompass Solution, Inc
>
> --- In vantage@yahoogroups.com, Ted Koch <tkoch77@> wrote:
> >
> > I would but it is more involved than just updating the fields. I'm using this with project entry. When a user chooses new project, a popup window displays with a combobox showing the company names. They choose a company and an ID is generated. Ex: 12-A-0001. 12 is the year, A corresponds to the company they chose (could also be B or C also depending on which company they selected), and 0001 is the incrementing number. So if they choose company (110) which would equal 11-B-0001 as the ID let's say, I would want it to increment the number05 field for company (110). Hope that makes sense.
> >
> >
> >
> > ________________________________
> >Â From: Kevin Simon <simstrak@>
> > To: vantage@yahoogroups.com
> > Sent: Thursday, February 2, 2012 3:11 PM
> > Subject: RE: [Vantage] Update Company.Number05 field from different company
> >Â
> > Why not try using 4GL code from within a BPM? 4GL code really doesn't care
> > what company you're in - it's just seeing these as progress tables.
> >
> >
> >
> > Kevin Simon
> >
> >
> >
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> > tkoch77
> > Sent: Thursday, February 02, 2012 2:37 PM
> > To: vantage@yahoogroups.com
> > Subject: [Vantage] Update Company.Number05 field from different company
> >
> >
> >
> > Â
> >
> > I am trying to update the Number05 field which is in a different company
> > from the one I am in. I have code that works if updating in the current
> > comapny (100), but fails if trying from company (100) to update Number05 in
> > company (110). Any ideas what I'm missing? I think it has to do with the
> > Session I am getting. Thanks for any help.
> >
> > Private Function GetNextKeyD3() As String
> > '//Use the company Adapter to Store our sequance number Number01
> > Dim co as company = nothing
> > co = new company(ProjectEntryForm.Session.ConnectionPool)
> > Dim cds as companydataset = co.GetByID("110")
> >
> > Dim nextKey As String = String.Empty
> >
> > Try
> > nextKey = cds.Company.Rows(0)("Number05").toString()
> > cds.Company.Rows(0).BeginEdit()
> > cds.Company.Rows(0)("Number05") += 1
> > cds.Company.Rows(0)("Character01") = todayDate
> > cds.Company.Rows(0).EndEdit()
> > co.Update(cds)
> > Catch ex As exception
> > MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> > mation)
> > End Try
> > 'messagebox.show("nextKey = " & nextKey)
> > return nextKey
> > End Function
> >
> >
> >
> >
> >
> > [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/.%c2%a0
> > (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
> >
> >
> >
> > [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/.%c2%a0
> (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
>
>
>
> [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/.%c2%a0
(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



[Non-text portions of this message have been removed]
Brute force method. substring(string(year),3,2), probably a more eloquent method exists.

--- In vantage@yahoogroups.com, Ted Koch <tkoch77@...> wrote:
>
> Any idea how to format and return the year to just 12 not 2012?
>
>
>
> ________________________________
> From: jckinneman <jckinneman@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, February 2, 2012 4:49 PM
> Subject: [Vantage] Re: Update Company.Number05 field from different company
>
> are you popping up during embedded(.net code) or during the BPM?
>
> --- In vantage@yahoogroups.com, Ted Koch <tkoch77@> wrote:
> >
> > I have the form popping up via pre-processing on the GetNewProject method and then was assigning Project.Character05 this value in post-processing and then using character05 it in my .net code
> >
> >
> >
> > ________________________________
> >Â From: jckinneman <jckinneman@>
> > To: vantage@yahoogroups.com
> > Sent: Thursday, February 2, 2012 4:30 PM
> > Subject: [Vantage] Re: Update Company.Number05 field from different company
> >Â
> > are you on 9, in 9 you can have the BPM popup an input form or you can pass the information via the contextBPM Dataset to the BPM after they make their choice.
> >
> > Jim Kinneman
> > Senior Consultant
> > Encompass Solution, Inc
> >
> > --- In vantage@yahoogroups.com, Ted Koch <tkoch77@> wrote:
> > >
> > > I would but it is more involved than just updating the fields. I'm using this with project entry. When a user chooses new project, a popup window displays with a combobox showing the company names. They choose a company and an ID is generated. Ex: 12-A-0001. 12 is the year, A corresponds to the company they chose (could also be B or C also depending on which company they selected), and 0001 is the incrementing number. So if they choose company (110) which would equal 11-B-0001 as the ID let's say, I would want it to increment the number05 field for company (110). Hope that makes sense.
> > >
> > >
> > >
> > > ________________________________
> > >Â From: Kevin Simon <simstrak@>
> > > To: vantage@yahoogroups.com
> > > Sent: Thursday, February 2, 2012 3:11 PM
> > > Subject: RE: [Vantage] Update Company.Number05 field from different company
> > >Â
> > > Why not try using 4GL code from within a BPM? 4GL code really doesn't care
> > > what company you're in - it's just seeing these as progress tables.
> > >
> > >
> > >
> > > Kevin Simon
> > >
> > >
> > >
> > > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> > > tkoch77
> > > Sent: Thursday, February 02, 2012 2:37 PM
> > > To: vantage@yahoogroups.com
> > > Subject: [Vantage] Update Company.Number05 field from different company
> > >
> > >
> > >
> > > Â
> > >
> > > I am trying to update the Number05 field which is in a different company
> > > from the one I am in. I have code that works if updating in the current
> > > comapny (100), but fails if trying from company (100) to update Number05 in
> > > company (110). Any ideas what I'm missing? I think it has to do with the
> > > Session I am getting. Thanks for any help.
> > >
> > > Private Function GetNextKeyD3() As String
> > > '//Use the company Adapter to Store our sequance number Number01
> > > Dim co as company = nothing
> > > co = new company(ProjectEntryForm.Session.ConnectionPool)
> > > Dim cds as companydataset = co.GetByID("110")
> > >
> > > Dim nextKey As String = String.Empty
> > >
> > > Try
> > > nextKey = cds.Company.Rows(0)("Number05").toString()
> > > cds.Company.Rows(0).BeginEdit()
> > > cds.Company.Rows(0)("Number05") += 1
> > > cds.Company.Rows(0)("Character01") = todayDate
> > > cds.Company.Rows(0).EndEdit()
> > > co.Update(cds)
> > > Catch ex As exception
> > > MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> > > mation)
> > > End Try
> > > 'messagebox.show("nextKey = " & nextKey)
> > > return nextKey
> > > End Function
> > >
> > >
> > >
> > >
> > >
> > > [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/.%c2%a0
> > > (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
> > >
> > >
> > >
> > > [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/.%c2%a0
> > (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
> >
> >
> >
> > [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/.%c2%a0
> (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
>
>
>
> [Non-text portions of this message have been removed]
>
Im trying to assign this to a variable, not sure what I'm doing wrong to return the year. Get the error: Missing FOR, FIND or CREATE for a table with year in current block.

define variable yr as character no-undo.
Assign yr = substring(string(year),3,2).



________________________________
From: jckinneman <jckinneman@...>
To: vantage@yahoogroups.com
Sent: Thursday, February 2, 2012 5:08 PM
Subject: [Vantage] Re: Update Company.Number05 field from different company

Brute force method. substring(string(year),3,2), probably a more eloquent method exists.

--- In vantage@yahoogroups.com, Ted Koch <tkoch77@...> wrote:
>
> Any idea how to format and return the year to just 12 not 2012?
>
>
>
> ________________________________
>Â From: jckinneman <jckinneman@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, February 2, 2012 4:49 PM
> Subject: [Vantage] Re: Update Company.Number05 field from different company

> are you popping up during embedded(.net code) or during the BPM?
>
> --- In vantage@yahoogroups.com, Ted Koch <tkoch77@> wrote:
> >
> > I have the form popping up via pre-processing on the GetNewProject method and then was assigning Project.Character05 this value in post-processing and then using character05 it in my .net code
> >
> >
> >
> > ________________________________
> >Â From: jckinneman <jckinneman@>
> > To: vantage@yahoogroups.com
> > Sent: Thursday, February 2, 2012 4:30 PM
> > Subject: [Vantage] Re: Update Company.Number05 field from different company
> >Â
> > are you on 9, in 9 you can have the BPM popup an input form or you can pass the information via the contextBPM Dataset to the BPM after they make their choice.
> >
> > Jim Kinneman
> > Senior Consultant
> > Encompass Solution, Inc
> >
> > --- In vantage@yahoogroups.com, Ted Koch <tkoch77@> wrote:
> > >
> > > I would but it is more involved than just updating the fields. I'm using this with project entry. When a user chooses new project, a popup window displays with a combobox showing the company names. They choose a company and an ID is generated. Ex: 12-A-0001. 12 is the year, A corresponds to the company they chose (could also be B or C also depending on which company they selected), and 0001 is the incrementing number. So if they choose company (110) which would equal 11-B-0001 as the ID let's say, I would want it to increment the number05 field for company (110). Hope that makes sense.
> > >
> > >
> > >
> > > ________________________________
> > >Â From: Kevin Simon <simstrak@>
> > > To: vantage@yahoogroups.com
> > > Sent: Thursday, February 2, 2012 3:11 PM
> > > Subject: RE: [Vantage] Update Company.Number05 field from different company
> > >Â
> > > Why not try using 4GL code from within a BPM? 4GL code really doesn't care
> > > what company you're in - it's just seeing these as progress tables.
> > >
> > >
> > >
> > > Kevin Simon
> > >
> > >
> > >
> > > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> > > tkoch77
> > > Sent: Thursday, February 02, 2012 2:37 PM
> > > To: vantage@yahoogroups.com
> > > Subject: [Vantage] Update Company.Number05 field from different company
> > >
> > >
> > >
> > > Â
> > >
> > > I am trying to update the Number05 field which is in a different company
> > > from the one I am in. I have code that works if updating in the current
> > > comapny (100), but fails if trying from company (100) to update Number05 in
> > > company (110). Any ideas what I'm missing? I think it has to do with the
> > > Session I am getting. Thanks for any help.
> > >
> > > Private Function GetNextKeyD3() As String
> > > '//Use the company Adapter to Store our sequance number Number01
> > > Dim co as company = nothing
> > > co = new company(ProjectEntryForm.Session.ConnectionPool)
> > > Dim cds as companydataset = co.GetByID("110")
> > >
> > > Dim nextKey As String = String.Empty
> > >
> > > Try
> > > nextKey = cds.Company.Rows(0)("Number05").toString()
> > > cds.Company.Rows(0).BeginEdit()
> > > cds.Company.Rows(0)("Number05") += 1
> > > cds.Company.Rows(0)("Character01") = todayDate
> > > cds.Company.Rows(0).EndEdit()
> > > co.Update(cds)
> > > Catch ex As exception
> > > MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> > > mation)
> > > End Try
> > > 'messagebox.show("nextKey = " & nextKey)
> > > return nextKey
> > > End Function
> > >
> > >
> > >
> > >
> > >
> > > [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/.%c2%a0
> > > (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
> > >
> > >
> > >
> > > [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/.%c2%a0
> > (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
> >
> >
> >
> > [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/.%c2%a0
> (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
>
>
>
> [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/.%c2%a0
(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



[Non-text portions of this message have been removed]
Usually that indicates an issue with your query..can you post your code in its entirety?

Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-0590
FAX: (715)284-4084
[Description: cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Ted Koch
Sent: Thursday, February 02, 2012 5:57 PM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Re: Update Company.Number05 field from different company



Im trying to assign this to a variable, not sure what I'm doing wrong to return the year. Get the error: Missing FOR, FIND or CREATE for a table with year in current block.

define variable yr as character no-undo.
Assign yr = substring(string(year),3,2).

________________________________
From: jckinneman <jckinneman@...<mailto:jckinneman%40yahoo.com>>
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Sent: Thursday, February 2, 2012 5:08 PM
Subject: [Vantage] Re: Update Company.Number05 field from different company

Brute force method. substring(string(year),3,2), probably a more eloquent method exists.

--- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted Koch <tkoch77@...> wrote:
>
> Any idea how to format and return the year to just 12 not 2012?
>
>
>
> ________________________________
> From: jckinneman <jckinneman@...>
> To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> Sent: Thursday, February 2, 2012 4:49 PM
> Subject: [Vantage] Re: Update Company.Number05 field from different company
>
> are you popping up during embedded(.net code) or during the BPM?
>
> --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted Koch <tkoch77@> wrote:
> >
> > I have the form popping up via pre-processing on the GetNewProject method and then was assigning Project.Character05 this value in post-processing and then using character05 it in my .net code
> >
> >
> >
> > ________________________________
> > From: jckinneman <jckinneman@>
> > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > Sent: Thursday, February 2, 2012 4:30 PM
> > Subject: [Vantage] Re: Update Company.Number05 field from different company
> >
> > are you on 9, in 9 you can have the BPM popup an input form or you can pass the information via the contextBPM Dataset to the BPM after they make their choice.
> >
> > Jim Kinneman
> > Senior Consultant
> > Encompass Solution, Inc
> >
> > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted Koch <tkoch77@> wrote:
> > >
> > > I would but it is more involved than just updating the fields. I'm using this with project entry. When a user chooses new project, a popup window displays with a combobox showing the company names. They choose a company and an ID is generated. Ex: 12-A-0001. 12 is the year, A corresponds to the company they chose (could also be B or C also depending on which company they selected), and 0001 is the incrementing number. So if they choose company (110) which would equal 11-B-0001 as the ID let's say, I would want it to increment the number05 field for company (110). Hope that makes sense.
> > >
> > >
> > >
> > > ________________________________
> > > From: Kevin Simon <simstrak@>
> > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > Sent: Thursday, February 2, 2012 3:11 PM
> > > Subject: RE: [Vantage] Update Company.Number05 field from different company
> > >
> > > Why not try using 4GL code from within a BPM? 4GL code really doesn't care
> > > what company you're in - it's just seeing these as progress tables.
> > >
> > >
> > >
> > > Kevin Simon
> > >
> > >
> > >
> > > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of
> > > tkoch77
> > > Sent: Thursday, February 02, 2012 2:37 PM
> > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > Subject: [Vantage] Update Company.Number05 field from different company
> > >
> > >
> > >
> > >
> > >
> > > I am trying to update the Number05 field which is in a different company
> > > from the one I am in. I have code that works if updating in the current
> > > comapny (100), but fails if trying from company (100) to update Number05 in
> > > company (110). Any ideas what I'm missing? I think it has to do with the
> > > Session I am getting. Thanks for any help.
> > >
> > > Private Function GetNextKeyD3() As String
> > > '//Use the company Adapter to Store our sequance number Number01
> > > Dim co as company = nothing
> > > co = new company(ProjectEntryForm.Session.ConnectionPool)
> > > Dim cds as companydataset = co.GetByID("110")
> > >
> > > Dim nextKey As String = String.Empty
> > >
> > > Try
> > > nextKey = cds.Company.Rows(0)("Number05").toString()
> > > cds.Company.Rows(0).BeginEdit()
> > > cds.Company.Rows(0)("Number05") += 1
> > > cds.Company.Rows(0)("Character01") = todayDate
> > > cds.Company.Rows(0).EndEdit()
> > > co.Update(cds)
> > > Catch ex As exception
> > > MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> > > mation)
> > > End Try
> > > 'messagebox.show("nextKey = " & nextKey)
> > > return nextKey
> > > End Function
> > >
> > >
> > >
> > >
> > >
> > > [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/.<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
> > >
> > >
> > >
> > > [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/.<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
> >
> >
> >
> > [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/.<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
>
>
>
> [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/.<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

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



[Non-text portions of this message have been removed]
The code validates if i comment the top two lines, but get that error when i try to assign the yr variable.

define variable yr as character no-undo.
Assign yr = substring(string(year),3,2).

FOR EACH ttproject.

IF ttproject.Character05 = "100" Then
   for each company where company.Company = "100".
         ttproject.ProjectID = "-" + "A" + "-" + string(company.Number05).
         company.Number05 = company.Number05 + 1.


end.

IF ttproject.Character05 = "110" Then
   for each company where company.Company = "110".
         ttproject.ProjectID = "-" + "B" + "-" + string(company.Number05).
         company.Number05 = company.Number05 + 1.
   end.

end.



________________________________
From: Rob Bucek <rbucek@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Thursday, February 2, 2012 7:04 PM
Subject: RE: [Vantage] Re: Update Company.Number05 field from different company

Usually that indicates an issue with your query..can you post your code in its entirety?

Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-0590
FAX: (715)284-4084
[Description: cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Ted Koch
Sent: Thursday, February 02, 2012 5:57 PM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Re: Update Company.Number05 field from different company



Im trying to assign this to a variable, not sure what I'm doing wrong to return the year. Get the error: Missing FOR, FIND or CREATE for a table with year in current block.

define variable yr as character no-undo.
Assign yr = substring(string(year),3,2).

________________________________
From: jckinneman <jckinneman@...<mailto:jckinneman%40yahoo.com>>
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Sent: Thursday, February 2, 2012 5:08 PM
Subject: [Vantage] Re: Update Company.Number05 field from different company

Brute force method. substring(string(year),3,2), probably a more eloquent method exists.

--- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted Koch <tkoch77@...> wrote:
>
> Any idea how to format and return the year to just 12 not 2012?
>
>
>
> ________________________________
>Â From: jckinneman <jckinneman@...>
> To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> Sent: Thursday, February 2, 2012 4:49 PM
> Subject: [Vantage] Re: Update Company.Number05 field from different company
>
> are you popping up during embedded(.net code) or during the BPM?
>
> --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted Koch <tkoch77@> wrote:
> >
> > I have the form popping up via pre-processing on the GetNewProject method and then was assigning Project.Character05 this value in post-processing and then using character05 it in my .net code
> >
> >
> >
> > ________________________________
> >Â From: jckinneman <jckinneman@>
> > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > Sent: Thursday, February 2, 2012 4:30 PM
> > Subject: [Vantage] Re: Update Company.Number05 field from different company
> >
> > are you on 9, in 9 you can have the BPM popup an input form or you can pass the information via the contextBPM Dataset to the BPM after they make their choice.
> >
> > Jim Kinneman
> > Senior Consultant
> > Encompass Solution, Inc
> >
> > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted Koch <tkoch77@> wrote:
> > >
> > > I would but it is more involved than just updating the fields. I'm using this with project entry. When a user chooses new project, a popup window displays with a combobox showing the company names. They choose a company and an ID is generated. Ex: 12-A-0001. 12 is the year, A corresponds to the company they chose (could also be B or C also depending on which company they selected), and 0001 is the incrementing number. So if they choose company (110) which would equal 11-B-0001 as the ID let's say, I would want it to increment the number05 field for company (110). Hope that makes sense.
> > >
> > >
> > >
> > > ________________________________
> > >Â From: Kevin Simon <simstrak@>
> > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > Sent: Thursday, February 2, 2012 3:11 PM
> > > Subject: RE: [Vantage] Update Company.Number05 field from different company
> > >
> > > Why not try using 4GL code from within a BPM? 4GL code really doesn't care
> > > what company you're in - it's just seeing these as progress tables.
> > >
> > >
> > >
> > > Kevin Simon
> > >
> > >
> > >
> > > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of
> > > tkoch77
> > > Sent: Thursday, February 02, 2012 2:37 PM
> > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > Subject: [Vantage] Update Company.Number05 field from different company
> > >
> > >
> > >
> > >
> > >
> > > I am trying to update the Number05 field which is in a different company
> > > from the one I am in. I have code that works if updating in the current
> > > comapny (100), but fails if trying from company (100) to update Number05 in
> > > company (110). Any ideas what I'm missing? I think it has to do with the
> > > Session I am getting. Thanks for any help.
> > >
> > > Private Function GetNextKeyD3() As String
> > > '//Use the company Adapter to Store our sequance number Number01
> > > Dim co as company = nothing
> > > co = new company(ProjectEntryForm.Session.ConnectionPool)
> > > Dim cds as companydataset = co.GetByID("110")
> > >
> > > Dim nextKey As String = String.Empty
> > >
> > > Try
> > > nextKey = cds.Company.Rows(0)("Number05").toString()
> > > cds.Company.Rows(0).BeginEdit()
> > > cds.Company.Rows(0)("Number05") += 1
> > > cds.Company.Rows(0)("Character01") = todayDate
> > > cds.Company.Rows(0).EndEdit()
> > > co.Update(cds)
> > > Catch ex As exception
> > > MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> > > mation)
> > > End Try
> > > 'messagebox.show("nextKey = " & nextKey)
> > > return nextKey
> > > End Function
> > >
> > >
> > >
> > >
> > >
> > > [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/.<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
> > >
> > >
> > >
> > > [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/.<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
> >
> >
> >
> > [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/.<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
>
>
>
> [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/.<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

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



[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/.%c2%a0
(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



[Non-text portions of this message have been removed]
"Assign yr = substring(string(year),3,2). "

Replace 'year' with an actual year. You can also extract the year from the
current date if you need. 'YEAR(TODAY)' should do it... I think.

On Thu, Feb 2, 2012 at 7:24 PM, Ted Koch <tkoch77@...> wrote:

> **
>
>
> The code validates if i comment the top two lines, but get that error when
> i try to assign the yr variable.
>
>
> define variable yr as character no-undo.
> Assign yr = substring(string(year),3,2).
>
> FOR EACH ttproject.
>
> IF ttproject.Character05 = "100" Then
> for each company where company.Company = "100".
> ttproject.ProjectID = "-" + "A" + "-" +
> string(company.Number05).
>
> company.Number05 = company.Number05 + 1.
>
> end.
>
> IF ttproject.Character05 = "110" Then
> for each company where company.Company = "110".
> ttproject.ProjectID = "-" + "B" + "-" +
> string(company.Number05).
>
> company.Number05 = company.Number05 + 1.
> end.
>
> end.
>
> ________________________________
> From: Rob Bucek <rbucek@...>
> To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
> Sent: Thursday, February 2, 2012 7:04 PM
> Subject: RE: [Vantage] Re: Update Company.Number05 field from different
> company
>
>
> Usually that indicates an issue with your query..can you post your code in
> its entirety?
>
> Rob Bucek
> Production Control Manager
> PH: (715) 284-5376 ext 311
> Mobile: (715)896-0590
> FAX: (715)284-4084
> [Description: cid:1.234354861@...]<
> http://www.dsmfg.com/>
> (Click the logo to view our site)<http://www.dsmfg.com/>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Ted Koch
> Sent: Thursday, February 02, 2012 5:57 PM
> To: vantage@yahoogroups.com
> Subject: Re: [Vantage] Re: Update Company.Number05 field from different
> company
>
> Im trying to assign this to a variable, not sure what I'm doing wrong to
> return the year. Get the error: Missing FOR, FIND or CREATE for a table
> with year in current block.
>
> define variable yr as character no-undo.
> Assign yr = substring(string(year),3,2).
>
> ________________________________
> From: jckinneman <jckinneman@...<mailto:jckinneman%40yahoo.com>>
> To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> Sent: Thursday, February 2, 2012 5:08 PM
> Subject: [Vantage] Re: Update Company.Number05 field from different company
>
> Brute force method. substring(string(year),3,2), probably a more eloquent
> method exists.
>
> --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted
> Koch <tkoch77@...> wrote:
> >
> > Any idea how to format and return the year to just 12 not 2012?
> >
> >
> >
> > ________________________________
> > From: jckinneman <jckinneman@...>
> > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > Sent: Thursday, February 2, 2012 4:49 PM
> > Subject: [Vantage] Re: Update Company.Number05 field from different
> company
> >
> > are you popping up during embedded(.net code) or during the BPM?
> >
> > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted
> Koch <tkoch77@> wrote:
> > >
> > > I have the form popping up via pre-processing on the GetNewProject
> method and then was assigning Project.Character05 this value in
> post-processing and then using character05 it in my .net code
> > >
> > >
> > >
> > > ________________________________
> > > From: jckinneman <jckinneman@>
> > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > Sent: Thursday, February 2, 2012 4:30 PM
> > > Subject: [Vantage] Re: Update Company.Number05 field from different
> company
> > >
> > > are you on 9, in 9 you can have the BPM popup an input form or you can
> pass the information via the contextBPM Dataset to the BPM after they make
> their choice.
> > >
> > > Jim Kinneman
> > > Senior Consultant
> > > Encompass Solution, Inc
> > >
> > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted
> Koch <tkoch77@> wrote:
> > > >
> > > > I would but it is more involved than just updating the fields. I'm
> using this with project entry. When a user chooses new project, a popup
> window displays with a combobox showing the company names. They choose a
> company and an ID is generated. Ex: 12-A-0001. 12 is the year, A
> corresponds to the company they chose (could also be B or C also depending
> on which company they selected), and 0001 is the incrementing number. So if
> they choose company (110) which would equal 11-B-0001 as the ID let's say,
> I would want it to increment the number05 field for company (110). Hope
> that makes sense.
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: Kevin Simon <simstrak@>
> > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > Sent: Thursday, February 2, 2012 3:11 PM
> > > > Subject: RE: [Vantage] Update Company.Number05 field from different
> company
> > > >
> > > > Why not try using 4GL code from within a BPM? 4GL code really
> doesn't care
> > > > what company you're in - it's just seeing these as progress tables.
> > > >
> > > >
> > > >
> > > > Kevin Simon
> > > >
> > > >
> > > >
> > > > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On
> Behalf Of
> > > > tkoch77
> > > > Sent: Thursday, February 02, 2012 2:37 PM
> > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > Subject: [Vantage] Update Company.Number05 field from different
> company
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > I am trying to update the Number05 field which is in a different
> company
> > > > from the one I am in. I have code that works if updating in the
> current
> > > > comapny (100), but fails if trying from company (100) to update
> Number05 in
> > > > company (110). Any ideas what I'm missing? I think it has to do with
> the
> > > > Session I am getting. Thanks for any help.
> > > >
> > > > Private Function GetNextKeyD3() As String
> > > > '//Use the company Adapter to Store our sequance number Number01
> > > > Dim co as company = nothing
> > > > co = new company(ProjectEntryForm.Session.ConnectionPool)
> > > > Dim cds as companydataset = co.GetByID("110")
> > > >
> > > > Dim nextKey As String = String.Empty
> > > >
> > > > Try
> > > > nextKey = cds.Company.Rows(0)("Number05").toString()
> > > > cds.Company.Rows(0).BeginEdit()
> > > > cds.Company.Rows(0)("Number05") += 1
> > > > cds.Company.Rows(0)("Character01") = todayDate
> > > > cds.Company.Rows(0).EndEdit()
> > > > co.Update(cds)
> > > > Catch ex As exception
> > > >
> MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> > > > mation)
> > > > End Try
> > > > 'messagebox.show("nextKey = " & nextKey)
> > > > return nextKey
> > > > End Function
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > [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/.<
> 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
> > > >
> > > >
> > > >
> > > > [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/.<
> 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
> > >
> > >
> > >
> > > [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/.<
> 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
> >
> >
> >
> > [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/.<
> 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
>
> [Non-text portions of this message have been removed]
>
> [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
>
> [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]
Thank you for the idea John. I used this and it worked.

define variable yr as integer no-undo.
Assign yr = YEAR(TODAY).
define variable yr2 as character no-undo.
Assign yr2 = substring(string(yr),3,2).


One more question regarding string manipulation. Do you have a way to add leading zeros to an integer variable? I always want the field to be 4 digits in length. So if my query returns 1 I want to see 0001. If it returns 234 I want to see 0234. I looked in the development handbook, nothing seemed to reference this.

Thanks again!

-Ted



________________________________
From: John Driggers <waffqle@...>
To: vantage@yahoogroups.com
Sent: Thursday, February 2, 2012 7:46 PM
Subject: Re: [Vantage] Re: Update Company.Number05 field from different company

"Assign yr = substring(string(year),3,2). "

Replace 'year' with an actual year. You can also extract the year from the
current date if you need. 'YEAR(TODAY)' should do it... I think.

On Thu, Feb 2, 2012 at 7:24 PM, Ted Koch <tkoch77@...> wrote:

> **
>
>
> The code validates if i comment the top two lines, but get that error when
> i try to assign the yr variable.
>
>
> define variable yr as character no-undo.
> Assign yr = substring(string(year),3,2).
>
> FOR EACH ttproject.
>
> IF ttproject.Character05 = "100" Then
>Â Â for each company where company.Company = "100".
>Â Â Â Â Â Â ttproject.ProjectID = "-" + "A" + "-" +
> string(company.Number05).
>
>Â Â Â Â Â Â company.Number05 = company.Number05 + 1.
>
> end.
>
> IF ttproject.Character05 = "110" Then
>Â Â for each company where company.Company = "110".
>Â Â Â Â Â Â ttproject.ProjectID = "-" + "B" + "-" +
> string(company.Number05).
>
>Â Â Â Â Â Â company.Number05 = company.Number05 + 1.
>Â Â end.
>
> end.
>
> ________________________________
> From: Rob Bucek <rbucek@...>
> To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
> Sent: Thursday, February 2, 2012 7:04 PM
> Subject: RE: [Vantage] Re: Update Company.Number05 field from different
> company
>
>
> Usually that indicates an issue with your query..can you post your code in
> its entirety?
>
> Rob Bucek
> Production Control Manager
> PH: (715) 284-5376 ext 311
> Mobile: (715)896-0590
> FAX: (715)284-4084
> [Description: cid:1.234354861@...]<
> http://www.dsmfg.com/>
> (Click the logo to view our site)<http://www.dsmfg.com/>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of Ted Koch
> Sent: Thursday, February 02, 2012 5:57 PM
> To: vantage@yahoogroups.com
> Subject: Re: [Vantage] Re: Update Company.Number05 field from different
> company
>
> Im trying to assign this to a variable, not sure what I'm doing wrong to
> return the year. Get the error: Missing FOR, FIND or CREATE for a table
> with year in current block.
>
> define variable yr as character no-undo.
> Assign yr = substring(string(year),3,2).
>
> ________________________________
> From: jckinneman <jckinneman@...<mailto:jckinneman%40yahoo.com>>
> To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> Sent: Thursday, February 2, 2012 5:08 PM
> Subject: [Vantage] Re: Update Company.Number05 field from different company
>
> Brute force method. substring(string(year),3,2), probably a more eloquent
> method exists.
>
> --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted
> Koch <tkoch77@...> wrote:
> >
> > Any idea how to format and return the year to just 12 not 2012?
> >
> >
> >
> > ________________________________
> >Â From: jckinneman <jckinneman@...>
> > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > Sent: Thursday, February 2, 2012 4:49 PM
> > Subject: [Vantage] Re: Update Company.Number05 field from different
> company
> >
> > are you popping up during embedded(.net code) or during the BPM?
> >
> > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted
> Koch <tkoch77@> wrote:
> > >
> > > I have the form popping up via pre-processing on the GetNewProject
> method and then was assigning Project.Character05 this value in
> post-processing and then using character05 it in my .net code
> > >
> > >
> > >
> > > ________________________________
> > >Â From: jckinneman <jckinneman@>
> > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > Sent: Thursday, February 2, 2012 4:30 PM
> > > Subject: [Vantage] Re: Update Company.Number05 field from different
> company
> > >
> > > are you on 9, in 9 you can have the BPM popup an input form or you can
> pass the information via the contextBPM Dataset to the BPM after they make
> their choice.
> > >
> > > Jim Kinneman
> > > Senior Consultant
> > > Encompass Solution, Inc
> > >
> > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted
> Koch <tkoch77@> wrote:
> > > >
> > > > I would but it is more involved than just updating the fields. I'm
> using this with project entry. When a user chooses new project, a popup
> window displays with a combobox showing the company names. They choose a
> company and an ID is generated. Ex: 12-A-0001. 12 is the year, A
> corresponds to the company they chose (could also be B or C also depending
> on which company they selected), and 0001 is the incrementing number. So if
> they choose company (110) which would equal 11-B-0001 as the ID let's say,
> I would want it to increment the number05 field for company (110). Hope
> that makes sense.
> > > >
> > > >
> > > >
> > > > ________________________________
> > > >Â From: Kevin Simon <simstrak@>
> > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > Sent: Thursday, February 2, 2012 3:11 PM
> > > > Subject: RE: [Vantage] Update Company.Number05 field from different
> company
> > > >
> > > > Why not try using 4GL code from within a BPM? 4GL code really
> doesn't care
> > > > what company you're in - it's just seeing these as progress tables.
> > > >
> > > >
> > > >
> > > > Kevin Simon
> > > >
> > > >
> > > >
> > > > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On
> Behalf Of
> > > > tkoch77
> > > > Sent: Thursday, February 02, 2012 2:37 PM
> > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > Subject: [Vantage] Update Company.Number05 field from different
> company
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > I am trying to update the Number05 field which is in a different
> company
> > > > from the one I am in. I have code that works if updating in the
> current
> > > > comapny (100), but fails if trying from company (100) to update
> Number05 in
> > > > company (110). Any ideas what I'm missing? I think it has to do with
> the
> > > > Session I am getting. Thanks for any help.
> > > >
> > > > Private Function GetNextKeyD3() As String
> > > > '//Use the company Adapter to Store our sequance number Number01
> > > > Dim co as company = nothing
> > > > co = new company(ProjectEntryForm.Session.ConnectionPool)
> > > > Dim cds as companydataset = co.GetByID("110")
> > > >
> > > > Dim nextKey As String = String.Empty
> > > >
> > > > Try
> > > > nextKey = cds.Company.Rows(0)("Number05").toString()
> > > > cds.Company.Rows(0).BeginEdit()
> > > > cds.Company.Rows(0)("Number05") += 1
> > > > cds.Company.Rows(0)("Character01") = todayDate
> > > > cds.Company.Rows(0).EndEdit()
> > > > co.Update(cds)
> > > > Catch ex As exception
> > > >
> MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> > > > mation)
> > > > End Try
> > > > 'messagebox.show("nextKey = " & nextKey)
> > > > return nextKey
> > > > End Function
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > [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/.<
> 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
> > > >
> > > >
> > > >
> > > > [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/.<
> 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
> > >
> > >
> > >
> > > [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/.<
> 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
> >
> >
> >
> > [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/.<
> 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
>
> [Non-text portions of this message have been removed]
>
> [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
>
> [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/.%c2%a0
(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



[Non-text portions of this message have been removed]
Use the FORMAT keyword
as shown

FOR FIRST OrderHed:
Display OrderHed.OrderNum FORMAT 9999. /*WILLDISPLAY 4 character 0001 0011
0111 1111*/
END.


note that a number higher than 9999 would fail that format.


*Jose C Gomez*
*Software Engineer*
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Thu, Feb 2, 2012 at 8:00 PM, Ted Koch <tkoch77@...> wrote:

> **
>
>
> Thank you for the idea John. I used this and it worked.
>
> define variable yr as integer no-undo.
> Assign yr = YEAR(TODAY).
> define variable yr2 as character no-undo.
> Assign yr2 = substring(string(yr),3,2).
>
> One more question regarding string manipulation. Do you have a way to add
> leading zeros to an integer variable? I always want the field to be 4
> digits in length. So if my query returns 1 I want to see 0001. If it
> returns 234 I want to see 0234. I looked in the development handbook,
> nothing seemed to reference this.
>
> Thanks again!
>
> -Ted
>
> ________________________________
> From: John Driggers <waffqle@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, February 2, 2012 7:46 PM
>
> Subject: Re: [Vantage] Re: Update Company.Number05 field from different
> company
>
> "Assign yr = substring(string(year),3,2). "
>
> Replace 'year' with an actual year. You can also extract the year from the
> current date if you need. 'YEAR(TODAY)' should do it... I think.
>
> On Thu, Feb 2, 2012 at 7:24 PM, Ted Koch <tkoch77@...> wrote:
>
> > **
> >
> >
> > The code validates if i comment the top two lines, but get that error
> when
> > i try to assign the yr variable.
> >
> >
> > define variable yr as character no-undo.
> > Assign yr = substring(string(year),3,2).
> >
> > FOR EACH ttproject.
> >
> > IF ttproject.Character05 = "100" Then
> > for each company where company.Company = "100".
> > ttproject.ProjectID = "-" + "A" + "-" +
> > string(company.Number05).
> >
> > company.Number05 = company.Number05 + 1.
> >
> > end.
> >
> > IF ttproject.Character05 = "110" Then
> > for each company where company.Company = "110".
> > ttproject.ProjectID = "-" + "B" + "-" +
> > string(company.Number05).
> >
> > company.Number05 = company.Number05 + 1.
> > end.
> >
> > end.
> >
> > ________________________________
> > From: Rob Bucek <rbucek@...>
> > To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
> > Sent: Thursday, February 2, 2012 7:04 PM
> > Subject: RE: [Vantage] Re: Update Company.Number05 field from different
> > company
> >
> >
> > Usually that indicates an issue with your query..can you post your code
> in
> > its entirety?
> >
> > Rob Bucek
> > Production Control Manager
> > PH: (715) 284-5376 ext 311
> > Mobile: (715)896-0590
> > FAX: (715)284-4084
> > [Description: cid:1.234354861@...]<
> > http://www.dsmfg.com/>
> > (Click the logo to view our site)<http://www.dsmfg.com/>
> >
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> > Of Ted Koch
> > Sent: Thursday, February 02, 2012 5:57 PM
> > To: vantage@yahoogroups.com
> > Subject: Re: [Vantage] Re: Update Company.Number05 field from different
> > company
> >
> > Im trying to assign this to a variable, not sure what I'm doing wrong to
> > return the year. Get the error: Missing FOR, FIND or CREATE for a table
> > with year in current block.
> >
> > define variable yr as character no-undo.
> > Assign yr = substring(string(year),3,2).
> >
> > ________________________________
> > From: jckinneman <jckinneman@...<mailto:jckinneman%40yahoo.com>>
> > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > Sent: Thursday, February 2, 2012 5:08 PM
> > Subject: [Vantage] Re: Update Company.Number05 field from different
> company
> >
> > Brute force method. substring(string(year),3,2), probably a more
> eloquent
> > method exists.
> >
> > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted
> > Koch <tkoch77@...> wrote:
> > >
> > > Any idea how to format and return the year to just 12 not 2012?
> > >
> > >
> > >
> > > ________________________________
> > > From: jckinneman <jckinneman@...>
> > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > Sent: Thursday, February 2, 2012 4:49 PM
> > > Subject: [Vantage] Re: Update Company.Number05 field from different
> > company
> > >
> > > are you popping up during embedded(.net code) or during the BPM?
> > >
> > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted
> > Koch <tkoch77@> wrote:
> > > >
> > > > I have the form popping up via pre-processing on the GetNewProject
> > method and then was assigning Project.Character05 this value in
> > post-processing and then using character05 it in my .net code
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: jckinneman <jckinneman@>
> > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > Sent: Thursday, February 2, 2012 4:30 PM
> > > > Subject: [Vantage] Re: Update Company.Number05 field from different
> > company
> > > >
> > > > are you on 9, in 9 you can have the BPM popup an input form or you
> can
> > pass the information via the contextBPM Dataset to the BPM after they
> make
> > their choice.
> > > >
> > > > Jim Kinneman
> > > > Senior Consultant
> > > > Encompass Solution, Inc
> > > >
> > > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>,
> Ted
> > Koch <tkoch77@> wrote:
> > > > >
> > > > > I would but it is more involved than just updating the fields. I'm
> > using this with project entry. When a user chooses new project, a popup
> > window displays with a combobox showing the company names. They choose a
> > company and an ID is generated. Ex: 12-A-0001. 12 is the year, A
> > corresponds to the company they chose (could also be B or C also
> depending
> > on which company they selected), and 0001 is the incrementing number. So
> if
> > they choose company (110) which would equal 11-B-0001 as the ID let's
> say,
> > I would want it to increment the number05 field for company (110). Hope
> > that makes sense.
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: Kevin Simon <simstrak@>
> > > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > > Sent: Thursday, February 2, 2012 3:11 PM
> > > > > Subject: RE: [Vantage] Update Company.Number05 field from different
> > company
> > > > >
> > > > > Why not try using 4GL code from within a BPM? 4GL code really
> > doesn't care
> > > > > what company you're in - it's just seeing these as progress tables.
> > > > >
> > > > >
> > > > >
> > > > > Kevin Simon
> > > > >
> > > > >
> > > > >
> > > > > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On
> > Behalf Of
> > > > > tkoch77
> > > > > Sent: Thursday, February 02, 2012 2:37 PM
> > > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > > Subject: [Vantage] Update Company.Number05 field from different
> > company
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > I am trying to update the Number05 field which is in a different
> > company
> > > > > from the one I am in. I have code that works if updating in the
> > current
> > > > > comapny (100), but fails if trying from company (100) to update
> > Number05 in
> > > > > company (110). Any ideas what I'm missing? I think it has to do
> with
> > the
> > > > > Session I am getting. Thanks for any help.
> > > > >
> > > > > Private Function GetNextKeyD3() As String
> > > > > '//Use the company Adapter to Store our sequance number Number01
> > > > > Dim co as company = nothing
> > > > > co = new company(ProjectEntryForm.Session.ConnectionPool)
> > > > > Dim cds as companydataset = co.GetByID("110")
> > > > >
> > > > > Dim nextKey As String = String.Empty
> > > > >
> > > > > Try
> > > > > nextKey = cds.Company.Rows(0)("Number05").toString()
> > > > > cds.Company.Rows(0).BeginEdit()
> > > > > cds.Company.Rows(0)("Number05") += 1
> > > > > cds.Company.Rows(0)("Character01") = todayDate
> > > > > cds.Company.Rows(0).EndEdit()
> > > > > co.Update(cds)
> > > > > Catch ex As exception
> > > > >
> >
> MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> > > > > mation)
> > > > > End Try
> > > > > 'messagebox.show("nextKey = " & nextKey)
> > > > > return nextKey
> > > > > End Function
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > [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/.<
> > 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
> > > > >
> > > > >
> > > > >
> > > > > [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/.<
> > 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
> > > >
> > > >
> > > >
> > > > [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/.<
> > 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
> > >
> > >
> > >
> > > [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/.<
> > 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
> >
> > [Non-text portions of this message have been removed]
> >
> > [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
> >
> > [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
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]
Thanks Jose, I was close I had tried that but with the 9999 in quotes. FORMAT "9999". I don't know if you saw my post earlier where this all started but ended up going this route from a suggestion. Wondering if you had any idea how to do this, still curious.


I am trying to update the Number05 field which is in a different company from the one I am in. I have code that works if updating in the current comapny (100), but fails if trying from company (100) to update
Number05 in company (110). Any ideas what I'm missing? I think it has to do with the Session I am getting. Thanks for any help.

Private Function GetNextKeyD3() As String
      '//Use the company Adapter to Store our sequance number Number01
      Dim co as company = nothing
      co = new company(ProjectEntryForm.Session.ConnectionPool)
      Dim cds as companydataset = co.GetByID("110")
     Â
      Dim nextKey As String = String.Empty

   Try
         nextKey = cds.Company.Rows(0)("Number05").toString()
         cds.Company.Rows(0).BeginEdit()
         cds.Company.Rows(0)("Number05") += 1
         cds.Company.Rows(0)("Character01") = todayDate
         cds.Company.Rows(0).EndEdit()
         co.Update(cds)
   Catch ex As exception
      MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Exclamation)
   End Try
      'messagebox.show("nextKey = " & nextKey)
      return nextKey
End Function


________________________________
From: Jose Gomez <jose@...>
To: vantage@yahoogroups.com
Sent: Thursday, February 2, 2012 8:15 PM
Subject: Re: [Vantage] Re: Update Company.Number05 field from different company

Use the FORMAT keyword
as shown

FOR FIRST OrderHed:
Display OrderHed.OrderNum FORMAT 9999. /*WILLDISPLAY 4 character 0001 0011
0111 1111*/
END.


note that a number higher than 9999 would fail that format.


*Jose C Gomez*
*Software Engineer*
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez>Â <http://www.facebook.com/josegomez>
 <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
 <http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
 <http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Thu, Feb 2, 2012 at 8:00 PM, Ted Koch <tkoch77@...> wrote:

> **
>
>
> Thank you for the idea John. I used this and it worked.
>
> define variable yr as integer no-undo.
> Assign yr = YEAR(TODAY).
> define variable yr2 as character no-undo.
> Assign yr2 = substring(string(yr),3,2).
>
> One more question regarding string manipulation. Do you have a way to add
> leading zeros to an integer variable? I always want the field to be 4
> digits in length. So if my query returns 1 I want to see 0001. If it
> returns 234 I want to see 0234. I looked in the development handbook,
> nothing seemed to reference this.
>
> Thanks again!
>
> -Ted
>
> ________________________________
> From: John Driggers <waffqle@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, February 2, 2012 7:46 PM
>
> Subject: Re: [Vantage] Re: Update Company.Number05 field from different
> company
>
> "Assign yr = substring(string(year),3,2). "
>
> Replace 'year' with an actual year. You can also extract the year from the
> current date if you need. 'YEAR(TODAY)' should do it... I think.
>
> On Thu, Feb 2, 2012 at 7:24 PM, Ted Koch <tkoch77@...> wrote:
>
> > **
> >
> >
> > The code validates if i comment the top two lines, but get that error
> when
> > i try to assign the yr variable.
> >
> >
> > define variable yr as character no-undo.
> > Assign yr = substring(string(year),3,2).
> >
> > FOR EACH ttproject.
> >
> > IF ttproject.Character05 = "100" Then
> >Â Â for each company where company.Company = "100".
> >Â Â Â Â Â Â ttproject.ProjectID = "-" + "A" + "-" +
> > string(company.Number05).
> >
> >Â Â Â Â Â Â company.Number05 = company.Number05 + 1.
> >
> > end.
> >
> > IF ttproject.Character05 = "110" Then
> >Â Â for each company where company.Company = "110".
> >Â Â Â Â Â Â ttproject.ProjectID = "-" + "B" + "-" +
> > string(company.Number05).
> >
> >Â Â Â Â Â Â company.Number05 = company.Number05 + 1.
> >Â Â end.
> >
> > end.
> >
> > ________________________________
> > From: Rob Bucek <rbucek@...>
> > To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
> > Sent: Thursday, February 2, 2012 7:04 PM
> > Subject: RE: [Vantage] Re: Update Company.Number05 field from different
> > company
> >
> >
> > Usually that indicates an issue with your query..can you post your code
> in
> > its entirety?
> >
> > Rob Bucek
> > Production Control Manager
> > PH: (715) 284-5376 ext 311
> > Mobile: (715)896-0590
> > FAX: (715)284-4084
> > [Description: cid:1.234354861@...]<
> > http://www.dsmfg.com/>
> > (Click the logo to view our site)<http://www.dsmfg.com/>
> >
> > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> > Of Ted Koch
> > Sent: Thursday, February 02, 2012 5:57 PM
> > To: vantage@yahoogroups.com
> > Subject: Re: [Vantage] Re: Update Company.Number05 field from different
> > company
> >
> > Im trying to assign this to a variable, not sure what I'm doing wrong to
> > return the year. Get the error: Missing FOR, FIND or CREATE for a table
> > with year in current block.
> >
> > define variable yr as character no-undo.
> > Assign yr = substring(string(year),3,2).
> >
> > ________________________________
> > From: jckinneman <jckinneman@...<mailto:jckinneman%40yahoo.com>>
> > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > Sent: Thursday, February 2, 2012 5:08 PM
> > Subject: [Vantage] Re: Update Company.Number05 field from different
> company
> >
> > Brute force method. substring(string(year),3,2), probably a more
> eloquent
> > method exists.
> >
> > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted
> > Koch <tkoch77@...> wrote:
> > >
> > > Any idea how to format and return the year to just 12 not 2012?
> > >
> > >
> > >
> > > ________________________________
> > >Â From: jckinneman <jckinneman@...>
> > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > Sent: Thursday, February 2, 2012 4:49 PM
> > > Subject: [Vantage] Re: Update Company.Number05 field from different
> > company
> > >
> > > are you popping up during embedded(.net code) or during the BPM?
> > >
> > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted
> > Koch <tkoch77@> wrote:
> > > >
> > > > I have the form popping up via pre-processing on the GetNewProject
> > method and then was assigning Project.Character05 this value in
> > post-processing and then using character05 it in my .net code
> > > >
> > > >
> > > >
> > > > ________________________________
> > > >Â From: jckinneman <jckinneman@>
> > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > Sent: Thursday, February 2, 2012 4:30 PM
> > > > Subject: [Vantage] Re: Update Company.Number05 field from different
> > company
> > > >
> > > > are you on 9, in 9 you can have the BPM popup an input form or you
> can
> > pass the information via the contextBPM Dataset to the BPM after they
> make
> > their choice.
> > > >
> > > > Jim Kinneman
> > > > Senior Consultant
> > > > Encompass Solution, Inc
> > > >
> > > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>,
> Ted
> > Koch <tkoch77@> wrote:
> > > > >
> > > > > I would but it is more involved than just updating the fields. I'm
> > using this with project entry. When a user chooses new project, a popup
> > window displays with a combobox showing the company names. They choose a
> > company and an ID is generated. Ex: 12-A-0001. 12 is the year, A
> > corresponds to the company they chose (could also be B or C also
> depending
> > on which company they selected), and 0001 is the incrementing number. So
> if
> > they choose company (110) which would equal 11-B-0001 as the ID let's
> say,
> > I would want it to increment the number05 field for company (110). Hope
> > that makes sense.
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > >Â From: Kevin Simon <simstrak@>
> > > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > > Sent: Thursday, February 2, 2012 3:11 PM
> > > > > Subject: RE: [Vantage] Update Company.Number05 field from different
> > company
> > > > >
> > > > > Why not try using 4GL code from within a BPM? 4GL code really
> > doesn't care
> > > > > what company you're in - it's just seeing these as progress tables.
> > > > >
> > > > >
> > > > >
> > > > > Kevin Simon
> > > > >
> > > > >
> > > > >
> > > > > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On
> > Behalf Of
> > > > > tkoch77
> > > > > Sent: Thursday, February 02, 2012 2:37 PM
> > > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > > Subject: [Vantage] Update Company.Number05 field from different
> > company
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > I am trying to update the Number05 field which is in a different
> > company
> > > > > from the one I am in. I have code that works if updating in the
> > current
> > > > > comapny (100), but fails if trying from company (100) to update
> > Number05 in
> > > > > company (110). Any ideas what I'm missing? I think it has to do
> with
> > the
> > > > > Session I am getting. Thanks for any help.
> > > > >
> > > > > Private Function GetNextKeyD3() As String
> > > > > '//Use the company Adapter to Store our sequance number Number01
> > > > > Dim co as company = nothing
> > > > > co = new company(ProjectEntryForm.Session.ConnectionPool)
> > > > > Dim cds as companydataset = co.GetByID("110")
> > > > >
> > > > > Dim nextKey As String = String.Empty
> > > > >
> > > > > Try
> > > > > nextKey = cds.Company.Rows(0)("Number05").toString()
> > > > > cds.Company.Rows(0).BeginEdit()
> > > > > cds.Company.Rows(0)("Number05") += 1
> > > > > cds.Company.Rows(0)("Character01") = todayDate
> > > > > cds.Company.Rows(0).EndEdit()
> > > > > co.Update(cds)
> > > > > Catch ex As exception
> > > > >
> >
> MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> > > > > mation)
> > > > > End Try
> > > > > 'messagebox.show("nextKey = " & nextKey)
> > > > > return nextKey
> > > > > End Function
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > [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/.<
> > 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
> > > > >
> > > > >
> > > > >
> > > > > [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/.<
> > 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
> > > >
> > > >
> > > >
> > > > [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/.<
> > 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
> > >
> > >
> > >
> > > [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/.<
> > 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
> >
> > [Non-text portions of this message have been removed]
> >
> > [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
> >
> > [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
>
> [Non-text portions of this message have been removed]
>

>


[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/.%c2%a0
(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



[Non-text portions of this message have been removed]
You are correct about the Session the session contains the Company ID, you
could start a new session with a user that is for that particular company
and that would solve your issues.

*Jose C Gomez*
*Software Engineer*
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Thu, Feb 2, 2012 at 8:33 PM, Ted Koch <tkoch77@...> wrote:

> **
>
>
> Thanks Jose, I was close I had tried that but with the 9999 in quotes.
> FORMAT "9999". I don't know if you saw my post earlier where this all
> started but ended up going this route from a suggestion. Wondering if you
> had any idea how to do this, still curious.
>
>
> I am trying to update the Number05 field which is in a different company
> from the one I am in. I have code that works if updating in the current
> comapny (100), but fails if trying from company (100) to update
> Number05 in company (110). Any ideas what I'm missing? I think it has to
> do with the Session I am getting. Thanks for any help.
>
> Private Function GetNextKeyD3() As String
> '//Use the company Adapter to Store our sequance number Number01
> Dim co as company = nothing
> co = new company(ProjectEntryForm.Session.ConnectionPool)
> Dim cds as companydataset = co.GetByID("110")
>
> Dim nextKey As String = String.Empty
>
> Try
> nextKey = cds.Company.Rows(0)("Number05").toString()
> cds.Company.Rows(0).BeginEdit()
> cds.Company.Rows(0)("Number05") += 1
> cds.Company.Rows(0)("Character01") = todayDate
> cds.Company.Rows(0).EndEdit()
> co.Update(cds)
> Catch ex As exception
>
> MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Exclamation)
> End Try
> 'messagebox.show("nextKey = " & nextKey)
> return nextKey
> End Function
>
> ________________________________
> From: Jose Gomez <jose@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, February 2, 2012 8:15 PM
>
> Subject: Re: [Vantage] Re: Update Company.Number05 field from different
> company
>
> Use the FORMAT keyword
> as shown
>
> FOR FIRST OrderHed:
> Display OrderHed.OrderNum FORMAT 9999. /*WILLDISPLAY 4 character 0001 0011
> 0111 1111*/
> END.
>
> note that a number higher than 9999 would fail that format.
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *checkout my new blog <http://www.usdoingstuff.com> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <
> http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <
> http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
> On Thu, Feb 2, 2012 at 8:00 PM, Ted Koch <tkoch77@...> wrote:
>
> > **
>
> >
> >
> > Thank you for the idea John. I used this and it worked.
> >
> > define variable yr as integer no-undo.
> > Assign yr = YEAR(TODAY).
> > define variable yr2 as character no-undo.
> > Assign yr2 = substring(string(yr),3,2).
> >
> > One more question regarding string manipulation. Do you have a way to add
> > leading zeros to an integer variable? I always want the field to be 4
> > digits in length. So if my query returns 1 I want to see 0001. If it
> > returns 234 I want to see 0234. I looked in the development handbook,
> > nothing seemed to reference this.
> >
> > Thanks again!
> >
> > -Ted
> >
> > ________________________________
> > From: John Driggers <waffqle@...>
> > To: vantage@yahoogroups.com
> > Sent: Thursday, February 2, 2012 7:46 PM
> >
> > Subject: Re: [Vantage] Re: Update Company.Number05 field from different
> > company
> >
> > "Assign yr = substring(string(year),3,2). "
> >
> > Replace 'year' with an actual year. You can also extract the year from
> the
> > current date if you need. 'YEAR(TODAY)' should do it... I think.
> >
> > On Thu, Feb 2, 2012 at 7:24 PM, Ted Koch <tkoch77@...> wrote:
> >
> > > **
> > >
> > >
> > > The code validates if i comment the top two lines, but get that error
> > when
> > > i try to assign the yr variable.
> > >
> > >
> > > define variable yr as character no-undo.
> > > Assign yr = substring(string(year),3,2).
> > >
> > > FOR EACH ttproject.
> > >
> > > IF ttproject.Character05 = "100" Then
> > > for each company where company.Company = "100".
> > > ttproject.ProjectID = "-" + "A" + "-" +
> > > string(company.Number05).
> > >
> > > company.Number05 = company.Number05 + 1.
> > >
> > > end.
> > >
> > > IF ttproject.Character05 = "110" Then
> > > for each company where company.Company = "110".
> > > ttproject.ProjectID = "-" + "B" + "-" +
> > > string(company.Number05).
> > >
> > > company.Number05 = company.Number05 + 1.
> > > end.
> > >
> > > end.
> > >
> > > ________________________________
> > > From: Rob Bucek <rbucek@...>
> > > To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
> > > Sent: Thursday, February 2, 2012 7:04 PM
> > > Subject: RE: [Vantage] Re: Update Company.Number05 field from different
> > > company
> > >
> > >
> > > Usually that indicates an issue with your query..can you post your code
> > in
> > > its entirety?
> > >
> > > Rob Bucek
> > > Production Control Manager
> > > PH: (715) 284-5376 ext 311
> > > Mobile: (715)896-0590
> > > FAX: (715)284-4084
> > > [Description: cid:1.234354861@...]<
> > > http://www.dsmfg.com/>
> > > (Click the logo to view our site)<http://www.dsmfg.com/>
> > >
> > > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> Behalf
> > > Of Ted Koch
> > > Sent: Thursday, February 02, 2012 5:57 PM
> > > To: vantage@yahoogroups.com
> > > Subject: Re: [Vantage] Re: Update Company.Number05 field from different
> > > company
> > >
> > > Im trying to assign this to a variable, not sure what I'm doing wrong
> to
> > > return the year. Get the error: Missing FOR, FIND or CREATE for a table
> > > with year in current block.
> > >
> > > define variable yr as character no-undo.
> > > Assign yr = substring(string(year),3,2).
> > >
> > > ________________________________
> > > From: jckinneman <jckinneman@...<mailto:jckinneman%40yahoo.com>>
> > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > Sent: Thursday, February 2, 2012 5:08 PM
> > > Subject: [Vantage] Re: Update Company.Number05 field from different
> > company
> > >
> > > Brute force method. substring(string(year),3,2), probably a more
> > eloquent
> > > method exists.
> > >
> > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted
> > > Koch <tkoch77@...> wrote:
> > > >
> > > > Any idea how to format and return the year to just 12 not 2012?
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: jckinneman <jckinneman@...>
> > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > Sent: Thursday, February 2, 2012 4:49 PM
> > > > Subject: [Vantage] Re: Update Company.Number05 field from different
> > > company
> > > >
> > > > are you popping up during embedded(.net code) or during the BPM?
> > > >
> > > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>,
> Ted
> > > Koch <tkoch77@> wrote:
> > > > >
> > > > > I have the form popping up via pre-processing on the GetNewProject
> > > method and then was assigning Project.Character05 this value in
> > > post-processing and then using character05 it in my .net code
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: jckinneman <jckinneman@>
> > > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > > Sent: Thursday, February 2, 2012 4:30 PM
> > > > > Subject: [Vantage] Re: Update Company.Number05 field from different
> > > company
> > > > >
> > > > > are you on 9, in 9 you can have the BPM popup an input form or you
> > can
> > > pass the information via the contextBPM Dataset to the BPM after they
> > make
> > > their choice.
> > > > >
> > > > > Jim Kinneman
> > > > > Senior Consultant
> > > > > Encompass Solution, Inc
> > > > >
> > > > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>,
> > Ted
> > > Koch <tkoch77@> wrote:
> > > > > >
> > > > > > I would but it is more involved than just updating the fields.
> I'm
> > > using this with project entry. When a user chooses new project, a popup
> > > window displays with a combobox showing the company names. They choose
> a
> > > company and an ID is generated. Ex: 12-A-0001. 12 is the year, A
> > > corresponds to the company they chose (could also be B or C also
> > depending
> > > on which company they selected), and 0001 is the incrementing number.
> So
> > if
> > > they choose company (110) which would equal 11-B-0001 as the ID let's
> > say,
> > > I would want it to increment the number05 field for company (110). Hope
> > > that makes sense.
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: Kevin Simon <simstrak@>
> > > > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > > > Sent: Thursday, February 2, 2012 3:11 PM
> > > > > > Subject: RE: [Vantage] Update Company.Number05 field from
> different
> > > company
> > > > > >
> > > > > > Why not try using 4GL code from within a BPM? 4GL code really
> > > doesn't care
> > > > > > what company you're in - it's just seeing these as progress
> tables.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Kevin Simon
> > > > > >
> > > > > >
> > > > > >
> > > > > > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On
> > > Behalf Of
> > > > > > tkoch77
> > > > > > Sent: Thursday, February 02, 2012 2:37 PM
> > > > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > > > Subject: [Vantage] Update Company.Number05 field from different
> > > company
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > I am trying to update the Number05 field which is in a different
> > > company
> > > > > > from the one I am in. I have code that works if updating in the
> > > current
> > > > > > comapny (100), but fails if trying from company (100) to update
> > > Number05 in
> > > > > > company (110). Any ideas what I'm missing? I think it has to do
> > with
> > > the
> > > > > > Session I am getting. Thanks for any help.
> > > > > >
> > > > > > Private Function GetNextKeyD3() As String
> > > > > > '//Use the company Adapter to Store our sequance number Number01
> > > > > > Dim co as company = nothing
> > > > > > co = new company(ProjectEntryForm.Session.ConnectionPool)
> > > > > > Dim cds as companydataset = co.GetByID("110")
> > > > > >
> > > > > > Dim nextKey As String = String.Empty
> > > > > >
> > > > > > Try
> > > > > > nextKey = cds.Company.Rows(0)("Number05").toString()
> > > > > > cds.Company.Rows(0).BeginEdit()
> > > > > > cds.Company.Rows(0)("Number05") += 1
> > > > > > cds.Company.Rows(0)("Character01") = todayDate
> > > > > > cds.Company.Rows(0).EndEdit()
> > > > > > co.Update(cds)
> > > > > > Catch ex As exception
> > > > > >
> > >
> >
> MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> > > > > > mation)
> > > > > > End Try
> > > > > > 'messagebox.show("nextKey = " & nextKey)
> > > > > > return nextKey
> > > > > > End Function
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > [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/.<
> > > 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
> > > > > >
> > > > > >
> > > > > >
> > > > > > [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/.<
> > > 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
> > > > >
> > > > >
> > > > >
> > > > > [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/.<
> > > 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
> > > >
> > > >
> > > >
> > > > [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/.<
> > > 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
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > > [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
> > >
> > > [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
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
>
> [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
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]
I will give it a go tomorrow, thanks again.



________________________________
From: Jose Gomez <jose@...>
To: vantage@yahoogroups.com
Sent: Thursday, February 2, 2012 8:39 PM
Subject: Re: [Vantage] Re: Update Company.Number05 field from different company

You are correct about the Session the session contains the Company ID, you
could start a new session with a user that is for that particular company
and that would solve your issues.

*Jose C Gomez*
*Software Engineer*
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez>Â <http://www.facebook.com/josegomez>
 <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
 <http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
 <http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Thu, Feb 2, 2012 at 8:33 PM, Ted Koch <tkoch77@...> wrote:

> **
>
>
> Thanks Jose, I was close I had tried that but with the 9999 in quotes.
> FORMAT "9999". I don't know if you saw my post earlier where this all
> started but ended up going this route from a suggestion. Wondering if you
> had any idea how to do this, still curious.
>
>
> I am trying to update the Number05 field which is in a different company
> from the one I am in. I have code that works if updating in the current
> comapny (100), but fails if trying from company (100) to update
> Number05 in company (110). Any ideas what I'm missing? I think it has to
> do with the Session I am getting. Thanks for any help.
>
> Private Function GetNextKeyD3() As String
>Â Â Â Â '//Use the company Adapter to Store our sequance number Number01
>Â Â Â Â Dim co as company = nothing
>Â Â Â Â co = new company(ProjectEntryForm.Session.ConnectionPool)
>Â Â Â Â Dim cds as companydataset = co.GetByID("110")
>
>Â Â Â Â Dim nextKey As String = String.Empty
>
>Â Â Try
>Â Â Â Â Â Â nextKey = cds.Company.Rows(0)("Number05").toString()
>Â Â Â Â Â Â cds.Company.Rows(0).BeginEdit()
>Â Â Â Â Â Â cds.Company.Rows(0)("Number05") += 1
>Â Â Â Â Â Â cds.Company.Rows(0)("Character01") = todayDate
>Â Â Â Â Â Â cds.Company.Rows(0).EndEdit()
>Â Â Â Â Â Â co.Update(cds)
>Â Â Catch ex As exception
>
> MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Exclamation)
>Â Â End Try
>Â Â Â Â 'messagebox.show("nextKey = " & nextKey)
>Â Â Â Â return nextKey
> End Function
>
> ________________________________
> From: Jose Gomez <jose@...>
> To: vantage@yahoogroups.com
> Sent: Thursday, February 2, 2012 8:15 PM
>
> Subject: Re: [Vantage] Re: Update Company.Number05 field from different
> company
>
> Use the FORMAT keyword
> as shown
>
> FOR FIRST OrderHed:
> Display OrderHed.OrderNum FORMAT 9999. /*WILLDISPLAY 4 character 0001 0011
> 0111 1111*/
> END.
>
> note that a number higher than 9999 would fail that format.
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *checkout my new blog <http://www.usdoingstuff.com> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez>Â <
> http://www.facebook.com/josegomez>
>Â <http://www.google.com/profiles/jose.gomez> <
> http://www.twitter.com/joc85>
>Â <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
>Â <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
> On Thu, Feb 2, 2012 at 8:00 PM, Ted Koch <tkoch77@...> wrote:
>
> > **
>
> >
> >
> > Thank you for the idea John. I used this and it worked.
> >
> > define variable yr as integer no-undo.
> > Assign yr = YEAR(TODAY).
> > define variable yr2 as character no-undo.
> > Assign yr2 = substring(string(yr),3,2).
> >
> > One more question regarding string manipulation. Do you have a way to add
> > leading zeros to an integer variable? I always want the field to be 4
> > digits in length. So if my query returns 1 I want to see 0001. If it
> > returns 234 I want to see 0234. I looked in the development handbook,
> > nothing seemed to reference this.
> >
> > Thanks again!
> >
> > -Ted
> >
> > ________________________________
> > From: John Driggers <waffqle@...>
> > To: vantage@yahoogroups.com
> > Sent: Thursday, February 2, 2012 7:46 PM
> >
> > Subject: Re: [Vantage] Re: Update Company.Number05 field from different
> > company
> >
> > "Assign yr = substring(string(year),3,2). "
> >
> > Replace 'year' with an actual year. You can also extract the year from
> the
> > current date if you need. 'YEAR(TODAY)' should do it... I think.
> >
> > On Thu, Feb 2, 2012 at 7:24 PM, Ted Koch <tkoch77@...> wrote:
> >
> > > **
> > >
> > >
> > > The code validates if i comment the top two lines, but get that error
> > when
> > > i try to assign the yr variable.
> > >
> > >
> > > define variable yr as character no-undo.
> > > Assign yr = substring(string(year),3,2).
> > >
> > > FOR EACH ttproject.
> > >
> > > IF ttproject.Character05 = "100" Then
> > >Â Â for each company where company.Company = "100".
> > >Â Â Â Â Â Â ttproject.ProjectID = "-" + "A" + "-" +
> > > string(company.Number05).
> > >
> > >Â Â Â Â Â Â company.Number05 = company.Number05 + 1.
> > >
> > > end.
> > >
> > > IF ttproject.Character05 = "110" Then
> > >Â Â for each company where company.Company = "110".
> > >Â Â Â Â Â Â ttproject.ProjectID = "-" + "B" + "-" +
> > > string(company.Number05).
> > >
> > >Â Â Â Â Â Â company.Number05 = company.Number05 + 1.
> > >Â Â end.
> > >
> > > end.
> > >
> > > ________________________________
> > > From: Rob Bucek <rbucek@...>
> > > To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
> > > Sent: Thursday, February 2, 2012 7:04 PM
> > > Subject: RE: [Vantage] Re: Update Company.Number05 field from different
> > > company
> > >
> > >
> > > Usually that indicates an issue with your query..can you post your code
> > in
> > > its entirety?
> > >
> > > Rob Bucek
> > > Production Control Manager
> > > PH: (715) 284-5376 ext 311
> > > Mobile: (715)896-0590
> > > FAX: (715)284-4084
> > > [Description: cid:1.234354861@...]<
> > > http://www.dsmfg.com/>
> > > (Click the logo to view our site)<http://www.dsmfg.com/>
> > >
> > > From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
> Behalf
> > > Of Ted Koch
> > > Sent: Thursday, February 02, 2012 5:57 PM
> > > To: vantage@yahoogroups.com
> > > Subject: Re: [Vantage] Re: Update Company.Number05 field from different
> > > company
> > >
> > > Im trying to assign this to a variable, not sure what I'm doing wrong
> to
> > > return the year. Get the error: Missing FOR, FIND or CREATE for a table
> > > with year in current block.
> > >
> > > define variable yr as character no-undo.
> > > Assign yr = substring(string(year),3,2).
> > >
> > > ________________________________
> > > From: jckinneman <jckinneman@...<mailto:jckinneman%40yahoo.com>>
> > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > Sent: Thursday, February 2, 2012 5:08 PM
> > > Subject: [Vantage] Re: Update Company.Number05 field from different
> > company
> > >
> > > Brute force method. substring(string(year),3,2), probably a more
> > eloquent
> > > method exists.
> > >
> > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, Ted
> > > Koch <tkoch77@...> wrote:
> > > >
> > > > Any idea how to format and return the year to just 12 not 2012?
> > > >
> > > >
> > > >
> > > > ________________________________
> > > >Â From: jckinneman <jckinneman@...>
> > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > Sent: Thursday, February 2, 2012 4:49 PM
> > > > Subject: [Vantage] Re: Update Company.Number05 field from different
> > > company
> > > >
> > > > are you popping up during embedded(.net code) or during the BPM?
> > > >
> > > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>,
> Ted
> > > Koch <tkoch77@> wrote:
> > > > >
> > > > > I have the form popping up via pre-processing on the GetNewProject
> > > method and then was assigning Project.Character05 this value in
> > > post-processing and then using character05 it in my .net code
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > >Â From: jckinneman <jckinneman@>
> > > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > > Sent: Thursday, February 2, 2012 4:30 PM
> > > > > Subject: [Vantage] Re: Update Company.Number05 field from different
> > > company
> > > > >
> > > > > are you on 9, in 9 you can have the BPM popup an input form or you
> > can
> > > pass the information via the contextBPM Dataset to the BPM after they
> > make
> > > their choice.
> > > > >
> > > > > Jim Kinneman
> > > > > Senior Consultant
> > > > > Encompass Solution, Inc
> > > > >
> > > > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>,
> > Ted
> > > Koch <tkoch77@> wrote:
> > > > > >
> > > > > > I would but it is more involved than just updating the fields.
> I'm
> > > using this with project entry. When a user chooses new project, a popup
> > > window displays with a combobox showing the company names. They choose
> a
> > > company and an ID is generated. Ex: 12-A-0001. 12 is the year, A
> > > corresponds to the company they chose (could also be B or C also
> > depending
> > > on which company they selected), and 0001 is the incrementing number.
> So
> > if
> > > they choose company (110) which would equal 11-B-0001 as the ID let's
> > say,
> > > I would want it to increment the number05 field for company (110). Hope
> > > that makes sense.
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > >Â From: Kevin Simon <simstrak@>
> > > > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > > > Sent: Thursday, February 2, 2012 3:11 PM
> > > > > > Subject: RE: [Vantage] Update Company.Number05 field from
> different
> > > company
> > > > > >
> > > > > > Why not try using 4GL code from within a BPM? 4GL code really
> > > doesn't care
> > > > > > what company you're in - it's just seeing these as progress
> tables.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Kevin Simon
> > > > > >
> > > > > >
> > > > > >
> > > > > > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On
> > > Behalf Of
> > > > > > tkoch77
> > > > > > Sent: Thursday, February 02, 2012 2:37 PM
> > > > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> > > > > > Subject: [Vantage] Update Company.Number05 field from different
> > > company
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > I am trying to update the Number05 field which is in a different
> > > company
> > > > > > from the one I am in. I have code that works if updating in the
> > > current
> > > > > > comapny (100), but fails if trying from company (100) to update
> > > Number05 in
> > > > > > company (110). Any ideas what I'm missing? I think it has to do
> > with
> > > the
> > > > > > Session I am getting. Thanks for any help.
> > > > > >
> > > > > > Private Function GetNextKeyD3() As String
> > > > > > '//Use the company Adapter to Store our sequance number Number01
> > > > > > Dim co as company = nothing
> > > > > > co = new company(ProjectEntryForm.Session.ConnectionPool)
> > > > > > Dim cds as companydataset = co.GetByID("110")
> > > > > >
> > > > > > Dim nextKey As String = String.Empty
> > > > > >
> > > > > > Try
> > > > > > nextKey = cds.Company.Rows(0)("Number05").toString()
> > > > > > cds.Company.Rows(0).BeginEdit()
> > > > > > cds.Company.Rows(0)("Number05") += 1
> > > > > > cds.Company.Rows(0)("Character01") = todayDate
> > > > > > cds.Company.Rows(0).EndEdit()
> > > > > > co.Update(cds)
> > > > > > Catch ex As exception
> > > > > >
> > >
> >
> MessageBox.Show(ex.Message,"Error",MessageBoxButtons.Ok,MessageBoxIcon.Excla
> > > > > > mation)
> > > > > > End Try
> > > > > > 'messagebox.show("nextKey = " & nextKey)
> > > > > > return nextKey
> > > > > > End Function
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > [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/.<
> > > 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
> > > > > >
> > > > > >
> > > > > >
> > > > > > [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/.<
> > > 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
> > > > >
> > > > >
> > > > >
> > > > > [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/.<
> > > 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
> > > >
> > > >
> > > >
> > > > [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/.<
> > > 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
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > > [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
> > >
> > > [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
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
>
> [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
>
> [Non-text portions of this message have been removed]
>

>


[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/.%c2%a0
(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



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