The following instructions are given that you have a lambda function created that works. AWS has API Gateway which enables developers to create RESTful API endpoints so people can call it and in turn run a lambda function. If you have never set up an API in API Gateway, you must:

  1. Log into the AWS console
  2. Search for “API Gateway” in the services tab
  3. Press “Create API”
  4. Choose REST / New API / assign a name to your api
  5. Once Created, add a resource to you api
  6. Create a method
  7. Add the created lambda function to the api resource

Once you have followed these steps the API Gateway will give you a url where you can call from your code and it will run your lambda function. One last thing you must do is to deploy the API. To do this, go to the resources tab of the API and click the Actions button and then click “Deploy”. Note that you may need to set up CORS if you want to secure your API.

If you are writing code and you want a user to manipulate data using methods you create but also don’t want the user to be able to manipulate data directly. One way you can go about this is through functional programming. Say you want to have an object that has the ability to move right and left with a starting position at 0. You might build out something like this:

const walker = {
    position = 0,
    right: function() {
        this.position++
    },
    left: function() {
        this.position–
    }
}

Then you call the function, walker.right() to move right and walker.left() to move left. However the way this is set up, a person can redefine the position variable by just directly changing it I.e. walker.position = 20. This is not good because the walker will be teleporting without ever hitting positions 1-19. So how do you stop a user from directly changing a variable that you don’t want them to change. An easy way to make this a private variable, is to make a function that return an object with only the method you want them to use. For example:

function walker() {
    let position = 0,
    return {
        right: function() {
            this.position++
        },
        left: function() {
            this.position–
        }
    }
}

const ben = walker()
ben.right()

I made a new variable called “ben” from the walker function. The way this is set up a user can no longer directly change the position property.

When using Reactjs, there are often times when you make a change to a database and need the updated data to be shown on the front-end. If you are taking advantage of the component did mount method to grab data once the page is mounted, you should move all of the code inside the component did mount to a new method so you can call the method once you make an update to your database. This will optimize your code since you wont be writing more code to grab the data once you make an update.

If you are creating a web app that uses lambda and a mysql database, there will be many times where you need to have sql information passing to and from lambda functions. A way to connect a lambda functions to a mysql database is using npm mysql. To set up the connection, there must be a connection variable defined. This variable must contain the mysql host name, user, password, and database. Once these are defined, the lambda function can connect to the mysql database with the code “connection.connect()”. Once this is ran, your lambda function can now run queries. These queries are written just like a regular sql query. Once you are done running your query make sure to declare your connection closed by stating “connection.end()”.

The process.env variables would be were you put your sql information.

 

**Note: You might need to configure your lambda function to be set up on the mysql database’s VPC.

If you are compiling a form that generates an error “Program X Does Not Allow INVOKE”, that means that the invoked program needs to be set to allow invoke. To do that, from a LID session, go to the form in pgmdef (pgmdef <prodline> <system code>). Select Define (F6) > Program (A).  Set the property “Can Be Accessed Via INVOKE” to Yes. Compile the invoked form and then compile the custom form that does the invoking.

Define (F6) > Program (A)

To append XML elements to a parent element in IPA, use the “Append output to” property on the XML node.  First, create a root XML element in the start node.  In your XML builder node, check the “Append output to” property, and set the root element to the variable that you created in the start node and the element that contains the list.  So <root>.<listelement>.

The XML Node can be used to build or read XML in IPA.

For the Action tab, select Build or Parse depending on the function you are performing.  You can Build the XML input if you have a schema to point to in the Build menu.  The Evaluate on Condition field means that the XML will only be built if criteria that you specify are matched.  The Append Output To option allows you to append the XML string you are building to a node that exists in your flow (i.e. adding elements to a list within a data iterator).

NOTE: Variables are denoted with curly braces: {variable}.

Here are some things to consider:

  1. Is there a cut-off date for open POs or are all open POs going to move over to the new systems?
  2. Will open (unmatched) receivers also be moved over to the new system for the open POs?
  3. When AP vendors are moved to the new system, will they have the same vendor number or is a vendor cross reference needed to import the open POs and receivers to the new system?
  4. Are your item numbers staying the same? If not, you will need an item cross reference for bringing the line items of the POs and receivers over to the new system.
  5. Is there anything special about your PO processing that needs to be taken into consideration when selecting POs or Receivers for conversion?

 

 

 

When setting up Landmark queries for IPA or Spreadsheet Designer, it helps to know which business class and field you are working with.  You can get these values in any Landmark application form (web-based or in Rich Client) by typing ctrl+shift and clicking on the field.

There are things to consider when transitioning your open receipts from one ERP to another:

  1. How old are the receipts before you will not move them to the new ERP?
  2. Are the POs still open for the open Receipts?
  3. Is there a new PO number that needs to be used for cross referencing purposes in the new ERP?
  4. How about the vendor number – did it change in the new ERP?
  5. What about your item numbers? – Do you need a cross reference between the old and new item numbers?