Showing posts with label Relational Database. Show all posts
Showing posts with label Relational Database. Show all posts

Wednesday, December 6, 2017

How to properly set Subforms in Zoho Creator Part 3

The first step is to have the Subtotal or Total field value in the Order Form. Normally this would be a currency field or decimal field if you need to consider 1 or more decimals into your calculations. If not you can also set it the field as a Numeric value field. Our example uses a currency field.

Second you need to think about the places where the script to aggregate the rows needs to occur. in our case there are several places. On Add Row, On Selecting a new Product, On Changing the Qty amount or the pricing. Its important that all scenarios are considered otherwise your calculations may not be properly aggregated if it encounters a scenario that you have not considered in your scripting yet.
Last but not least, the script below is ready for you to copy and paste into your application. Assuming of course that the field names of your Order Form are named exactly as our test application.


if ((row.Price  !=  null)  &&  (row.Qty  !=  null))
{
    row.SubTotal = (row.Price  *  row.Qty);
}
t = 0.0;
if ((row.Price  !=  null)  &&  (row.Qty  !=  null))
{
    for each rec in Item_Details
    {
        t = (rec.SubTotal  +  t);
    }
}
input.Subtotal = t;
Do not hesitate to contact me if you have any questions. I would be more than glad to help you buil an amazing online database application with Zoho Creator.

Saturday, November 25, 2017

How to properly set Subforms in Zoho Creator Part 1

This is the most important step in the process of setting up your zoho creator database. A properly linked setup will enable your information to run smoothly and avoid waisting space ( MB )

First, you need to create at least 2 Forms. For example.- Orders and Items. An Order can have multiple items and 1 item can be part of many Orders. Creating a many to many relationship.

Second, you need to add the Subform Items inside the Form Orders and name it. Then you have to add a Lookup field in the Items Form and click on Existing Relations. 
Do NOT forget this part. This is the key. You must have a lookup field linking the original Form to each record on the subform you are creating. Makes Sense?

If it does not or need any help do not hesitate to contact us. We can guide you through the process to set your Subform for success.

Tuesday, November 29, 2016

How to properly set Subforms in Zoho Creator Part 1



This is the most important step in the process of setting up your zoho creator database. A properly linked setup will enable your information to run smoothly and avoid waisting space ( MB )

First, you need to create at least 2 Forms. For example.- Orders and Items. An Order can have multiple items and 1 item can be part of many Orders. Creating a many to many relationship.

Second, you need to add the Subform Items inside the Form Orders and name it. Then you have to add a Lookup field in the Items Form and click on Existing Relations. 


Do NOT forget this part. This is the key. You must have a lookup field linking the original Form to each record on the subform you are creating. Makes Sense?

If it does not or need any help do not hesitate to contact us. We can guide you through the process to set your Subform for success.