Jump to content

Creating a FIND from a portal check list


Greg Hains

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

Recommended Posts

Good morning.

I have a portal which has two fields displayed: a check box (a field with 0 or 1 in it), and a name.
What I am trying to achieve is generate a FIND based on the names that are ticked in that portal but am not sure how.

The portal may have - for example - 30 names in it, but I select 10 names from it (by ticking box against each name). I then want to extract(?) the names from that list to then do a FIND with as many New Request; Set Field [for_each_user_selected] commands as necessary.  I'm not sure how to achieve this. 

Anybody have an idea please?

Cheers,
Greg

Link to comment
Share on other sites

If this is a single user solution, the simplest thing to do would be to commit the records, go to a layout based on the same Table Occurrance as the portal.  Enter Find mode, set the checkbox field to 1, the Perform Find. 

Keep in mind you'll have to clear all the checkboxes after the find, with Replace Field Contents.

If this is a multi user solution, you should not  use this method as you may have different users selecting different records, and Replace Field Contents may conflict with record locking.

You can also set up a relationship to do this then use GTRR.

I recall seeing a few examples to do this to avoid checkboxes and record locking issues on the forums.  I'll see if I can find them tomorrow  

 

Link to comment
Share on other sites

6 minutes ago, Steve Martino said:

If this is a single user solution, the simplest thing to do would be to commit the records, go to a layout based on the same Table Occurrance as the portal.  Enter Find mode, set the checkbox field to 1, the Perform Find. 

Keep in mind you'll have to clear all the checkboxes after the find, with Replace Field Contents.

If this is a multi user solution, you should not  use this method as you may have different users selecting different records, and Replace Field Contents may conflict with record locking.

You can also set up a relationship to do this then use GTRR.

I recall seeing a few examples to do this to avoid checkboxes and record locking issues on the forums.  I'll see if I can find them tomorrow  

 

Hi Steve,

Thanks for responding.

The portal is actually a different table containing staff names, and hen we use that list to search through another table of client data for which clients that staff member assisted - if that makes sense.  It is a multi-user solution, however as this is a rarely used report, it wont have users crawling all over it all the time so that shouldn't be an issue.

Thank you for your help and I'll keep my ear to the ground if you find anything. I'll also keep looking.

Cheers,
Greg  :)

Link to comment
Share on other sites

Greg, you made it more confusing to me :) 

If you could use real names, more assistance would come.

Specifically the TO for the main layout, the TO for the portal, etc.

What's the relationships between the 2.

Is the portal filtered.

If I think I follow you, you have a client layout, with a portal of all staff members.  You want to click on names in the portal, Let's say Sue, Bob Betty.

Then you want to do a find in the clients TO for all the records where someone was assisted by Sue OR Bob OR Betty, or do you want to do a find where someone was assisted by Sue AND Bob AND Betty-I'm guessing it's OR.

Pics/sample file always help

Edited by Steve Martino
Link to comment
Share on other sites

Hi Greg,

Helping you find an answer to your question is important to us. Sometimes arriving at the actual solution can drag on, and in the process, it can also get convoluted and hard to follow. 
Some of the stumbling blocks involved in providing a fast solution are the lack of  information or our understanding your schema. 

1 hour ago, Steve Martino said:

If you could use real names, more assistance would come.

It's a pretty simple to provide the information needed in a question and you will find this information covered in the Guidelines.   

You should Zero in on these Steps (5 - 8) 

Understand, the more we know  your schema, the better we can help.

  •  Attach a copy of your file
  • or a mockup of the file
  • Use your naming conventions when asking your questions in the TOs, scripts, relationships, etc.

 

 

Link to comment
Share on other sites

Good morning, and thank you all for your responses.

You're absolutely right - without an example I'm probably only making it harder to understand what I'm trying to achieve.

Attached is a rough sample file. Within are some random names of a staff register, and a table of sales made by that staff.
I have loosely constructed a relationship for the portal (which may very well be the reason I am not resolving this - I'm doing it the wrong way), from which I can select names.  In my case, I have a dedicated table for the staff, hence the portal. Whether I use a check box or not is purely up for discussion.

Anyway, you are all more accomplished than me so you will see what I've done and what I'm trying to achieve.

Many thanks in advance. :)

Sample.fmp12

Link to comment
Share on other sites

Greg, you still didn't answer my previous questions.  Unfortunately, you're file is of no help.

Basically (I'm guessing) you need to have a table of sales, with a primary key.  Then you need a table of staff, connected primary key sales to foreign key staff.

So a portal on the Sales table based on Staff, has the staff associated with that particular sale.

Now you can also do another Table Occurrence Group where you link Staff to Sales, so a portal of Sales on the Staff Layout will tell you all the sales on particular staff member had.

From there you can easily do finds (reports) on the staff.  

Then you can do a find on certain names, and a sub-summary report could show the data as:

Doe, John

   Sale1

   Sale 2

   Sale 4

Smith, Bett

   Sale 4

   Sale 6

or

Sale 1

  Doe, John

  Edison Thomas

Sale 2

  Doe, John

Sale3

  Beans, Franken

Sale4

   Doe, John

   Smith, Bett

Link to comment
Share on other sites

Hi Steve,

I thought my sample file covered my request fairly well. If not, then all I want to do is select items from a list and run a Find against those items - whatever the schema method employed may be.

Thanks for your response, but that was a little over my head.  I'll close this ticket before embarrassing myself any further.

Greg

Link to comment
Share on other sites

This topic is 2085 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.