4GL Help Blank Title 84404

Thank you for the replies, but I still cannot get this to work. Thomas, you are right in that using the ASSIGN function will not work. I replaced ASSIGN with DISPLAY, and still got nothing. Then, I replaced that line of code with Thomas' suggestion of: RUN lib\UpdateTableBuffer.p(input BUFFER APInvGrp:HANDLE, 'Date01', Fiscal.StartDate) and received an error stating:

4GL STOP condition: The Server application has returned an error. (7243) (7241).

I have tried using a DateTimeEditor with ShortChar01 and Date01 and a textbox with the same properties, but none will work.

I have been trying to run the BPM from Method Code: APInvGrp.GetNewAPInvGrp as a Post-Processing Action.

Any suggestions on what I am doing wrong?

--- In vantage@yahoogroups.com, Thomas Rose <t.rose@...> wrote:
>
> There are probably a few people on this forum who can answer this question better than I, but, hopefully I can get you started. The error message is the clue, here. You are trying to assign a date value to a text (character) field. 4GL is not going to let you do that. You have a couple of options:
>
> 1. Use the STRING function to convert your date into text first.
>
> 2. Put the date into an unused date field. APInvGrp has Date01 through Date05 available.
> Of the two options, I prefer the second one, but if you have a good reason for using the first option, then go that way.
>
> I think you may still get an error, even with that change. I have not had success with using the ASSIGN statement with the (slightly dumbed down) 4GL environment provided by Epicor. Instead, I would use:
> RUN lib\UpdateTableBuffer.p(input BUFFER APInvGrp:HANDLE, 'Date01', Fiscal.StartDate).
>
> I doubt you will have any problem displaying date values in a text box. I'm pretty sure the system is smart enough to be able to do that.
>
> Thom Rose
> Controller
> Electric Mirror LLC
> HOTEL LUXURY
>
> "The World Leader in Back-lit Mirrors & Mirror TV Technology"
>
> T 425 776-4946
> A 11831 Beverly Park Rd, Bldg D, Everett, WA 98204 USA
> www.electricmirror.com<http://www.electricmirror.com>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of homestyleindustries
> Sent: Tuesday, October 27, 2009 9:31 AM
> To: vantage@yahoogroups.com
> Subject: [Vantage] 4GL Help
>
>
>
> I am trying to get a query through 4GL to work. The code I have is:
>
> For Each APInvGrp no-lock:
> Find Fiscal where Fiscal.FiscalYear = ApInvGrp.FiscalYear and Fiscal.FiscalPeriod = APInvGrp.FiscalPeriod no-lock no-error.
> If Available Fiscal then
> Assign APInvGrp.ShortChar01 = Fiscal.StartDate.
> End.
>
> My goal is to have textboxes in the AP Invoice Screen show the start date and end date of a period so invoices are not posted to the wrong period.
>
> The error message I am getting states:
>
> ** Incompatible data types in expression or assignment. (223)**
>
> How do I convert the data from StartDate and EndDate from the Fiscal table to a data type the textbox will accept, or is there a better way to do this?
>
> Thanks in advance.
>
> Eric
>
>
>
> [Non-text portions of this message have been removed]
>
I am trying to get a query through 4GL to work. The code I have is:

For Each APInvGrp no-lock:
Find Fiscal where Fiscal.FiscalYear = ApInvGrp.FiscalYear and Fiscal.FiscalPeriod = APInvGrp.FiscalPeriod no-lock no-error.
If Available Fiscal then
Assign APInvGrp.ShortChar01 = Fiscal.StartDate.
End.

My goal is to have textboxes in the AP Invoice Screen show the start date and end date of a period so invoices are not posted to the wrong period.

The error message I am getting states:

** Incompatible data types in expression or assignment. (223)**

How do I convert the data from StartDate and EndDate from the Fiscal table to a data type the textbox will accept, or is there a better way to do this?

Thanks in advance.

Eric
Not sure why you would not use UD date fields ad date displays but you
are looking for:



Assign APInvGrp.ShortChar01 = STRING(Fiscal.StartDate).







Dale E. Schuerman

Senior Consultant

Epicor Certified Consulting Partner



RAM Software Systems, Inc.

972-669-0763 x233 (voice)

972-669-9603 (fax)

mailto:dale.schuerman@...
<BLOCKED::blocked::mailto:dale.schuerman@...> (email)

http://www.ramsys.com <BLOCKED::blocked::http://www.ramsys.com/>
(website)





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of homestyleindustries
Sent: Tuesday, October 27, 2009 11:31 AM
To: vantage@yahoogroups.com
Subject: [Vantage] 4GL Help





I am trying to get a query through 4GL to work. The code I have is:

For Each APInvGrp no-lock:
Find Fiscal where Fiscal.FiscalYear = ApInvGrp.FiscalYear and
Fiscal.FiscalPeriod = APInvGrp.FiscalPeriod no-lock no-error.
If Available Fiscal then
Assign APInvGrp.ShortChar01 = Fiscal.StartDate.
End.

My goal is to have textboxes in the AP Invoice Screen show the start
date and end date of a period so invoices are not posted to the wrong
period.

The error message I am getting states:

** Incompatible data types in expression or assignment. (223)**

How do I convert the data from StartDate and EndDate from the Fiscal
table to a data type the textbox will accept, or is there a better way
to do this?

Thanks in advance.

Eric




########################################################################
Attention:
This email message is privileged and confidential. If you are not the
intended recipient please delete the message and notify the sender.
Any views or opinions presented are solely those of the author.

This email message has been scanned for Viruses and Content and cleared
by MailMarshal SMTP

For more information go to http://www.ramsys.com
########################################################################


[Non-text portions of this message have been removed]
There are probably a few people on this forum who can answer this question better than I, but, hopefully I can get you started. The error message is the clue, here. You are trying to assign a date value to a text (character) field. 4GL is not going to let you do that. You have a couple of options:

1. Use the STRING function to convert your date into text first.

2. Put the date into an unused date field. APInvGrp has Date01 through Date05 available.
Of the two options, I prefer the second one, but if you have a good reason for using the first option, then go that way.

I think you may still get an error, even with that change. I have not had success with using the ASSIGN statement with the (slightly dumbed down) 4GL environment provided by Epicor. Instead, I would use:
RUN lib\UpdateTableBuffer.p(input BUFFER APInvGrp:HANDLE, 'Date01', Fiscal.StartDate).

I doubt you will have any problem displaying date values in a text box. I'm pretty sure the system is smart enough to be able to do that.

Thom Rose
Controller
Electric Mirror LLC
HOTEL LUXURY

"The World Leader in Back-lit Mirrors & Mirror TV Technology"

T 425 776-4946
A 11831 Beverly Park Rd, Bldg D, Everett, WA 98204 USA
www.electricmirror.com<http://www.electricmirror.com>

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of homestyleindustries
Sent: Tuesday, October 27, 2009 9:31 AM
To: vantage@yahoogroups.com
Subject: [Vantage] 4GL Help



I am trying to get a query through 4GL to work. The code I have is:

For Each APInvGrp no-lock:
Find Fiscal where Fiscal.FiscalYear = ApInvGrp.FiscalYear and Fiscal.FiscalPeriod = APInvGrp.FiscalPeriod no-lock no-error.
If Available Fiscal then
Assign APInvGrp.ShortChar01 = Fiscal.StartDate.
End.

My goal is to have textboxes in the AP Invoice Screen show the start date and end date of a period so invoices are not posted to the wrong period.

The error message I am getting states:

** Incompatible data types in expression or assignment. (223)**

How do I convert the data from StartDate and EndDate from the Fiscal table to a data type the textbox will accept, or is there a better way to do this?

Thanks in advance.

Eric



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