Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if statement in GP macros?

Status
Not open for further replies.

Alcar

Programmer
Sep 10, 2001
595
US
Is there such a thing?

I am trying to update thousands of recrods via a macro and I am getting different modal windows popups per employee.
I cannot determine what is causing them and when they are supposed to show or not.

my solution would be something similar to an IF statement.

Is there such a thing in the GP macro syntax?

Daren J. Lahey
Programmer Analyst
FAQ183-874 contains Suggestions for Getting Quick and Appropriate Answers to your questions.
 
There is no conditional syntax available with Macros in GP.

The best you can hope is use VBA to suppress or choose the appropriate action on each window message. Have the VBA only respond to the Dialog message if a given USERID or global variable has been set.

------
Robert
 
Hi;

VBA is the only option and the easiest ways are Modifier or Integration Assistant for Excel. IAExcel seems to be not really used here but it works great. It can even be deployed to end users as a set.
 
thousands of records in a macro - sounds more like a sql update to me - what kind of update are you trying to do? have you tried to go directly against the sql table?
 
We've been working with GP since 1998 and they have been doing many updates "behind the scenes".

When I was hired I saw a GP installation that was very buggy. After many considerations I convinced them not to do any more updates behind the scenes (unless it was the only way out).

I am trying to use as much as possible the tools that MS put into place for us to make mass updates. Integration Manager, Table Imports and Macros.
When all three of them fail to do the job, then I'll look into creating the SQL script to run on the server.

So that is where we are. 1200 employees to update every year for their 401k maximum allowable deductions. GP doesn't seem to have a yearly mass update for this normal task, therefore they would have to do it one by one.
That's where I am looking to run a macro (actually, I already have created the macro and it ran just fine).

It's all about the complexity of GP. To give you an example: we had payroll run a payroll batch with the wrong date on it... dated 2009 (even if the payroll period for that year was closed it posted just fine!! ). When I was asked to remove the checks from the system, I was directed to do it directly on the server.
I counted 6 tables I found references on that check and removed them.
Yet, still today, that check is showing in the 2009 period and from what our VAT says, it will stay there until we can clear it in 2009.
Given that experience, I am not looking to run scripts unless they are proofed by MS or the VAT ;)

Which then sends it back to me and looking for alternatives... ahhh gotta love this job ;)

Daren J. Lahey
Programmer Analyst
FAQ183-874 contains Suggestions for Getting Quick and Appropriate Answers to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top