Jump to content
Sign in to follow this  
csharpmin

Removing a record without removing it

Recommended Posts

I'm working on a database for my babysitting company. In this example, there are three tables. Client, Job, ClientsChildren. I want a portal listing ClientsChildren for the Job. That's easy enough. But I want to be able to remove ClientChildren from the job with a script, without removing the ClientChildren from the client. So far if I delete row from a ClientChildren portal in the job layout, it removes the child completely from the database.

A real life example: The Johnson's have three kids: Jimmy, Timmy, and baby Claire. For this hypothetical job, the sitter will sit for Jimmy and Timmy, but the Johnson parents will keep baby Claire with them. In the jobs layout, I want to be able to click a button to remove baby claire without removing her as a child of the Johnson's.

Can anyone suggest the solution?

Share this post


Link to post
Share on other sites

You can have a field that stores the ClientsChildrenIDs for each job.

For example, if for job 1, you are going to watch Child 1,3,4 but not 2, the text field would store it as 1¶3¶4 or represented in your field:

1

2

4

Then this will match only those 3 out of 4 children. When you choose a client for a job, you can have a portal display all the children for that client. Then with a button, you can run a quick script that adds that childID to the field for a particular job.

Share this post


Link to post
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
Reply to this topic...

×   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.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.