How do i update two records in different tables that are related to one another

How do i update two records in different tables that are related to one another

  
how do i update the listed document status to "out" or "in" when its being borrowed from the repository. that is the original document. i have attached the file to have the idea.
The users wil use this system to record the original documents information as to where they are stored and also allow the user to scan the documents and store them online.
On the other hand officials can borrow the original document (Hard Copy), therefore during the process of booking the document "out" or returning it "in" the user will use the REQUESTER EDIT to book it out. My problem is that when the document STATUS changes in the requester List to OUT i also want to link this status with the STATUS in the DOCUMENT Entity for it to change to the value of the status attribute in the REQUEST ENTITY which will be "OUT" without having to do it manually.

Secondly to upload the file using Input Filename, how does this widget work. and where does it store the uploaded file and how dow i display its icon and its link and how can it be downloaded.

can someone help here

Regards
Hi Tshegetsang,

How are you? Long time no see!

Regarding your questions, if you want to change two entities, you will have to do it manually. The best way to do it will be to create a single action that does all the changes, and you use that action whenever you want to change their status.

Regarding the Input Filename widget, after you press a button in that screen whose action is set to Submit, you'll have access to the uploaded file's name, type and binary content. You should store that binary content in the database, along with any information that's relevant to you (i.e. name, type, etc).

To download it, you can have a link that goes to an action where you retrieve that specific binary content, and use a Download Node to start the download process in the user's browser. Regarding displaying the icon, however, that will have to be done manually, since the file type icons that you see in your file explorer are handled by the operating system. In this case, you will have to infer the document type either by its file extension, or type, and then display the right icon depending on which file it is.

I hope this helps.

Regards,

Paulo Tavares