To change the records of the second table (Client), put the following code on the onBeforUpdate Event. We change the client field of the formulary to select type and we create a OnChange Event on that field calling the method ‘carregarCliente’, including the following line:Ĭhanging records of both tables at same time In the onLoad event call our ‘carregarCliente’ method by entering the following command line: In the first bracket inform the row of the matrix, on the second we inform the column. Hello, I have a Grid, with initial module Search. This dataset is a PHP matrix where we have two positions in brackets. The second parameter we reported a String with the sql SELECT statement to retrieve the values. you can give any name for this dataset, in this example we will name it customer. This macro have 2 parameters, the first is a dataset that retrieve the values. Here we are using the macros sc_lookup () with this macro can retrieve database records running a SELECT on any table in the database. I have updated SC & now this sql code in the lookup field isnt working: I have had more complex lookup SQL code from like 3 tables, concatenating multiple fields SELECT scconcat( ClassName, ' - ',ClassYear, ' - ',Section) FROM feesstructure, classes WHERE feesstructure.ClassID classes. Will create a PHP method called showCustomer, include the code below:Ĭompanyname, ContactName, stateid, city, address, CreditLimit In this application we have to create fields to show the values of the customer from the Customers table. Insert Button: Adds to the list the values informed on the fields Label and Value. Lookup Type: Define the functionality of the lookup, being: Single Value, Multiple Values. we will show customers data in the form application of order.įirst we will create a form based application in the first table, orders table. Scriptcase Serial Key: A999A999A999- D111H111G111DG2P: D111H111G111-DG2P: Multiple masks (Phone Number). We will use tables that represent orders and customers, where each order has its customers. In the tab Edit fields, you can configure each field according to what you need to display within the application. Take this code in a java script, that’s it. When you touch the button update in a form than you can see some java-code in the left-bottom corner of your browser (firefox). In this tutorial we will show how to show and manipulate data of two different tables in the same application with macros. The refined search is automatically added to the Grid application when one or more Grid fields are selected in the tab select fields. Sometimes the solution is more easy then you think. Showing fields of two tables in the same application.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |