Trust ID PBCEX logo 300x102

Can't figure out how to use storage items....

10 years 3 months ago
Senior Boarder
Senior Boarder
Posts: 47
Topic Author
Can't figure out how to use storage items.... #1780

Can't get my head around storage items....

I need to have a table that basically stores issue numbers, which has to be separate from the main data table. To test this I created the following in SQL server.
Table STUD - ID, Firstname, Surname
Table ISSUE - ID, iss

Populated both tables, one to one relationship on ID. ID primary key on both tables.

Data definition using table STUD fields visible but not editable.
Added a storage item STUD_ISS below STUD based on table ISSUE

I would like to be able to update this field and also have a record created in table ISSUE if no record exists, which I thought was implied by the advanced option in storage-Item properties 'update row if primary key exists, insert row otherwise'

This field is not visible on the form to update, and mapping to database column does not show any fields from table ISSUE only table STUD......

Am I misinterpreting the 'Storage Item' function

10 years 3 months ago
Rutger Koperdraad
Platinum Boarder
Platinum Boarder
Posts: 1566
Can't figure out how to use storage items.... #1781

Please, note that storage items are processed when you print a card. So if you created a storage item to save the issue number when the card is printed, you are on the right track. You will have to map the storage item to some data source in the mapping window. You could map it to a global counter. for example, or construct an issue number out of the print date/time.

If you want to see the issue number in the database-edit window, you have to create a view in SQL Server that joins both tables and connect CardExchange to that view. Views are generally not editable, but I understand you don't want to edit the data anyway.

I hope this helps you. If you have any further questions, please, let me know.

Rutger Koperdraad
Senior Software Engineer

"A reasonable man adapts himself to the world. The unreasonable man persists in trying to adapt the world to himself. All progress, therefore, depends on the unreasonable man." (Bernard Shaw)