Thursday, October 30, 2008

Quickly create groups in Lotus Notes:

From the contacts view in your Personal Address Book, you can easily create a group containing names from selected documents.

For example, if I select people in my family, and then choose Tools - Copy Into New Group



Notes create a new Group document, with the values of each contact filled in automatically. All we need to do now is give the group a name, and save and close.




This is very useful if you often find that you are sending emails to the same group of people.

Wednesday, October 29, 2008

Make Subfile Page to retain its page:

If you select a record from a subfile with multiple pages (e.g. selecting an item from a subfile to change), make your change and then return back to your subfile, the subfile would usually reload from record one to the end, making you page down to the record you had changed. To bring you back to the page you were on, add the following code to your display file and program.
Code
Using PDM, in the control section of your display file, add in the line
@pag 4 0H SFLRCDNBR
@pag is in the NAME column, the 4 is the length, the 0 is the decimal position and the SFLRCDNBR is in the functions column.
In your program, initialize @pag to 1.
When you select the line to change, z-add the rrn to @pag, and your program will return you to the subfile page you were on.

Inventory:

Inventory is a list for goods and materials, or those goods and materials themselves, held available in stock by a business.
There are three basic reasons for keeping an inventory:
1. Time - The time lags present in the supply chain, from supplier to user at every stage, requires that you maintain certain amount of inventory to use in this "lead time"
2. Uncertainty - Inventories are maintained as buffers to meet uncertainties in demand, supply and movements of goods.
3. Economies of scale - Ideal condition of "one unit at a time at a place where user needs it, when he needs it" principle tends to incur lots of costs in terms of logistics. So bulk buying, movement and storing brings in economies of scale, thus inventory.
All these stock reasons can apply to any owner or product stage.
• Buffer stock is held in individual workstations against the possibility that the upstream workstation may be a little delayed in long setup or change-over time. This stock is then used while that change-over is happening.
• Distressed inventory is inventory whose potential to be sold at a normal cost has or will soon pass. In certain industries it could also mean that the stock is or will soon be impossible to sell. Examples of distressed inventory include products that have reached its expiry date, or has reached a date in advance of expiry at which the planned market will no longer purchase it (e.g. 3 months left to expiry), clothing that is defective or out of fashion, and old newspapers or magazines. It also includes computer or consumer-electronic equipment that is obsolescent or discontinued and whose manufacturer is unable to support it.

Thursday, October 23, 2008

Pearson’s Correlation:

The Pearson's correlation is used to find a correlation between at least two continuous variables. The value for a Pearson's can fall between 0.00 (no correlation) and 1.00 (perfect correlation). Other factors such as group size will determine if the correlation is significant. Generally, correlations above 0.80 are considered pretty high.

Positive correlation indicates that both variables increase or decrease together, whereas negative correlation indicates that as one variable increases, so the other decreases, and vice versa.

Wednesday, October 22, 2008

Easy way to Sort Subfile data:

Sorting data is something RPG programs often need to do. If it's just a simple single field array you're sorting in order to use the much faster binary search possible with %Lookup, for example, then SORTA works well and is simple. But what if it is a more complex task like sorting the data in a subfile on a user-selected column? Surely you need some more involved techniques, such as retrieving the data from the database again using a different ORDER BY on an SQL SELECT statement or using a different logical file or you could use the qsort C function for sorting the array elements in the program. Something as simple as SORTA can't be used for that, right?
Maybe so. The circumstances where this is effective are limited, for sure, but if your requirements fit, then using SORTA with a group field can be the simplest way and often a faster alternative than other methods you may have tried.
First of all, what's a group field? It's a field in a data structure that is broken down into smaller subfields. For example, group field SflData might be made up of information about products (name, price, quantity) by using the Overlay keyword, such as:
D SflDS Ds Inz
D SflData Like(SflRecData)
D Dim(999)
D Name Like(ProdDS)
D Overlay(SflData)
D Price Like(SellPr)
D Overlay(SflData:*Next)
D Qty Like(STOH)
D Overlay(SflData:*Next)
The effect is similar to nested data structures, except without the requirement to use qualified names. (Likewise, there are many limitations on group fields because of the lack of name qualification.) One additional thing that's nice about group fields compared to nested DSs is that we can use SORTA against any of the subfields in a group field array.
So this means if I wanted to sort the data in the SflData array by product name, I could do that with the following statement: SortA Name;. Much simpler than any of those other options I mentioned above! Of course, in nearly all cases, it would require the use of the built-in function %SubArr (substring array) because I'm not likely to have filled up all 999 elements of SflData. Even so, the entire bit of logic to accomplish sorting this subfile data in the sequence of any of the three fields could be as simple as:
If SortByName;
SortA %SubArr(Name:1:Count);
ElseIf SortByQty;
SortA %SubArr(Qty:1:Count);
ElseIf SortByPrice;
SortA %SubArr(Price:1:Count);
EndIf;
This technique is very simple and in most cases quite a fast way to sort subfile data (or any other kind of repeating data). It does have significant limitations. For example, you can only sort on one subfield at a time. (Of course, you could group two subfields together if they happen to be adjacent in the subfile record.) Also, you must be able to retrieve and store all the data destined for the subfile into an array so that you can sort it all together. For some very large subfiles, that won't be practical. But for those occasions where it works, it couldn't get much simpler.

Tuesday, October 21, 2008

Drop Shipping:

Definition: The process, in which a retailer markets a product, collects payment from the customer and then orders the item from a supplier, to be shipped directly that customer. The retailer's profit is the difference between the amount collected and the amount spent. No inventory is held and the retailer is not involved in the shipping.

Examples: To expand our product listing online, we use several suppliers that offer drop shipping.

Monday, October 20, 2008

Repeating Calendar entries in Lotus Notes:

When you schedule a meeting, click on repeat, and you will see a wide variety of options. You can choose when the meeting should repeat (weekly, monthly, yearly), for how long (duration or to a specific date), and even control things like what happens on weekends (move to Friday or Monday, or don't schedule at all). You can even choose "Custom" to select specific dates if none of the available combinations of parameters accomplishes what you are looking for. The dates are also computed and displayed for you in real time on the right hand side.