Jump to content
  • 0

Possibility To See, Insert And Update Lookup Values In A Report.


leadma
 Share

Question

I have a view With the relationship between tables. The values from a parent table are displayed With values from the related Field (configured i Relationship settings). When I create Search and Report With such a view I want to see values from the related table instead of Ids (from parent table).

Also I eant to be able to insert and update such records in Report.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

The reason you see the value not the ID in the table is that you have created a relationship between tables. To see the value in the report you need to create a view to join two tables and select the field with value to show instead of ID field. 

 

To be able to update or insert a record in a table make sure you have enabled advanced options and the in Search Result Options screen switch to advanced tab and enable update and insert. This might not be available when you have view as report page source for security purposes.

Link to comment
Share on other sites

  • 0

See an example of creating a View to join tables at http://howto.caspio.com/tables-and-views/what-are-views/creating-a-view-to-join-tables/. When you create a View you will join the tables on the related field (unique id of the parent table and the related field usually called foreign key in your child/related table). In your View you will choose any field you need to display in the Report. View only allows one of the tables to be editable so you need to choose which table you want to be editable in the View settings. Then you will create a Report based on the View where you can set the editable fields and display-only fields in the details page.

 

On another note, creating a relationship will facilitate creating a View and also allow you to enforce referential integrity of your data. You can get more information about this at http://howto.caspio.com/tables-and-views/relationships/.

 

Hope this information helps.

 

Cheers,

Barbara

Link to comment
Share on other sites

  • 0

As you said there might not be any meaning behind IDs for your web page user as much as the name. Here is a simple sample. Let's say we have two tables:

 

Company: Company_ID (unique), Company_Name

 

1, Company one

2, Company two

 

Employee: Employee_ID, Employee_Name, Company_ID

 

100, Chris, 1

200, Joe, 1

300, Mark, 2

 

If we want to show all the employees that are working in a company what we have in that table is Employee_ID, Employee_Name, Company_ID

 

web page user might not know the Company_ID so it is better to show the Company_Name but since this field is in Company table we need to join these two tables with a view using this connection:

Company.Company_ID=Employee.Company_ID

 

Meaning join these two tables where Company_ID from Company table equals to Company_ID from Employee table. So the result will be:

 

Employee_ID, Employee_Name, Company_ID, Company_ID, Company_Name

100, Chris, 1, 1, Company one

200, Joe, 1, 1, Company one

300, Mark, 2, 300, Mark, 2

 

Now in this view you also have Company_Name to select in your report

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...