Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Can data be copied from a Portal into another tabl


This topic is 7500 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Howdy All:

I have a relationship set up between two files in my solution. I am asking the users to do a fairly basic find of which the results are displayed in a portal. From this portal, i need to have them select one or two records that apply to the project they are working on, and have those records copy to a table where they can add more detailed notes and follow-up info. I have run head first into a brick wall on most attempts to make this fly. Any thoughts at all?

Thanks

Lakota

Posted

You can use a button with a script to Go to Related Records, going to any table that portal row is related to, then go to some other layout for the follow up.

If you wanted to select more than one record first, you would need something like a checkbox on the portal row, and then Go to Related Records through a different relationship where only checked records are part of the relationship (a different relationship than the portal's.)

Posted

Ender:

Sorry to pester, i am having trouble getting this together in practice. I have a layout that has a portal (with a checkbox) and either the user has to select a few records that match a set criteria or I need the system to select the checkbox based on search results. I just cant get them together to work properly.

Thanks

Lakota

Posted

No problem.

It sounds like you're stuck on the relationship, so let's try an example.

I have a table of Classes, and a related table of Students. They are related by Class::ClassID = Student::ClassID. In the Student table there is also a text field called Select that we will use as a checkbox in our portal ("1" is checked).

So on a layout in the Class file we will have a portal showing related students (using the Class::ClassID = Student::ClassID relationship.) This portal will have our checkbox, student name, etc. The purpose of this portal is to select students for printing a letter home.

Now the second relationship: In the Class file, we will define a global field One, and enter 1 into it in browse mode. Now in the Table Occurrence graph, we create a new occurrence of the Student table and attach it to the Class table with Class::ClassID = Student::ClassID AND Class::One = Student::Select.

If there are other tables we want to jump to from Student we must add new table occurrences to the graph and link them through the second occurrence of Student. For my simple example, I'll say my form letter is a layout in the Student file.

Now the relationships are set up, we just need to add a button and script to go to the related records and print the letter:

Go to Related Records [ Show only related records; From table: "Student 2"; Using layout: "Letter" (Student) ]

If [ Get(RecordNumber) = 0 ]

Go to Layout [original layout]

Show Custom Dialog [ "Error" ]

Halt Script

End If

Print Setup [ Restore; No Dialog ]

Print [ ]

Go to Layout [original layout]

This example doesn't create any additional records, but that's not hard if you need it. Just use the found set that you get from the Go to Related Records [] and loop through.

I have a solution like this with contact notes that allows teachers to type a contact note once, and post the same note to any selected students (for things like calls about upcoming events.)

This topic is 7500 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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