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

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

Recommended Posts

Posted

I have a value list that auto-populated with records from another table. Since there are about 500 items on the value list, I'd like to be able to search the value list -- as of now, the only "search" capability i have is to type a letter and it'll take me to that point in the value list.

Is there a way to put in a term and have the value list reduce itself to those related records that match?

thanks for your help.

Posted

Valuelist beyond say 10-15 choices are silly for the user to handle. You shall try to study dynamic valuelist!! This means that you have at least two popup next to each other the first to make a subselection via headers chosen in the first portal. Say you have a hardware store - would nails be of any meaning to be shown among buckets.

Thats one method, another is this:

http://www.newcenturydata.com/downloads/filter.zip

...which is a sort of search!

--sd

  • 4 weeks later...
Posted

Soren:

That's an interesting statement. I use a value list to find ID key for relating 2 tables. I have a company database and a contacts database. When I enter a new contact I lookup the company ID thru the VL. There are over 22,000 company entries so it is impossible to memorize them and I would think it a bit clumsy to search company DB and then go to enter the CO_ID in the related field. The CO_ID is a calc field that grabs the first 5 letters of the company name and the zipcode so we are sure it is unique. How would you suggest we do this that would be more elegant and efficient?

Al

Posted

Before I go into a deeper explanation, would I like to know if you familiar with these two techniques.

http://www.filemakermagazine.com/modules.php?op=modload&name=News&file=article&sid=550

Especially the way he does it in the second part!

--sd

Posted

Ok, I watched the video several times today, which prompted me to subscribe to the newsletter. :

I use the value field to find the CompanyID field and input it into the new record. It then populates the company data into the contact record. I use a similar approach for any layout where I need to populate Job Order info, contact info etc.

The technique you pointed me to looks very interesting, and maybe more efficient, but I'm not sure how I would incorporate this into my current application.

I look forward to your response.

Al

Posted

I think I'd best make you a template, but meanwhile is next step to read up on this "tiered tables" technique from http://www.codemastersworkshop.com/Downloads/WhitePaperForFMPNovices.pdf

...as well as dynamic valuelist - shown thru ValuelistItems(

My point is that you by establishing 7-8 relations to the same tables data, could split them over according tabs in a tabbed layout. Ideally with customized shortcut keys.

But you have to wait a little for the template, since i would need to got to a meeting today.

--sd

Posted

There are over 22,000 company entries so it is impossible to memorize them and I would think it a bit clumsy to search company DB and then go to enter the CO_ID in the related fiel

I might have attacked your problem wrong?? By assuming a different skillset. The issue here is that (probably???) you only know how to get the ID via valuelist, and have no idea that by putting a button in a portal row is all it takes to grap the ID from the releated record.

So instead of attempting to organize your data - of which I know nothing at all except its customers, will I instead suggest your learn from this template.

http://www.dwdataconcepts.com/dl/tw/Many2Many.zip

...which I attach as well, in fm7 format - because I was surprised to learn that you didn't get inspired at all?? ...although I introduced at least 3-4 techniques you should pick some the best ideas from.

That being said shouldn't you care more than nessersary with the reasoning behind Don's template - but instead focus entirely on the way the buttons work!

--sd

Many2Many.zip

Posted

Thanks for the info. I'll read it all today.

On the contrary, I was "inspired" by the concepts and thought of several applications where I could use it. He also finally answered my question about "How to develop an "OR" search with user input.

I just said I don't know if I completely understand the concept. But, then, that's the beauty of this forum where one can ask questions and learn from others who have been there before.

I'm sure I'll have more questions after I review your info and hope you will continue the conversation with me.

Thanks again,

Al

Posted

Hi Soren:

I reviewed the files and thank you for your input. I am assuming your suggestion, which I like, is that I develop a pop-up whereby I do a search for the company, view the results in a portal and click a button to store the CO_ID in the Contacts::CO_ID field. I will work on that this weekend. I hope my skillset is up to the task. I'll let you know.

I'm also assuming (God I hate to do that : that I could reuse the same layout to add the CO_ID key or other related keys to other tables, i.e., Jobs, expenses, candidates, etc. Would you suggest one common pop-up or separate pop-ups for each layout/table?

Al

Posted

Hi Soren:

It is working like a charm. I have set up a pop-up filtering portal(unfortunately it's a pop under, How do I make sure a window, when called comes to the top??)I then have inserted a button (actually 2 one for entering ID in Contacts and another for entering ID in Jobs)that opens a new record, inserts the CompanyID field and waits for me to complete the data entry and then returns me to the filter screen. I can then repeat the same process or exit from script and it returns me to my original screen. Thanks for all your suggestions.

BTW, I can not credit for the brilliant filtering system. I found it somewhere on the forum or on FM knowledge base. Unfortunately, I can not remember where so I am unable to give the proper credits. I just don't want anyone to think I'm trying to take credit for the design and scripts.

Just one last thing, well two,, can you tell me why It is a pop under and not Pop up and is there a way to control where the data is input without separate buttons? This could get rather clunky since I used this process on a numbr of different layouts. I'm attaching the screen shots and scripts.

Al

Filter_set_up.pdf

Posted

You can call your contact selection layout/table with a script parameter that tells the script from where the script were called, in order to return there again at the same spot, as well as the selected value can be put as paramter in the Exit Script[ ] that otherwise hardly have any use since it already occures at the very end of the script.

Exit Script[] value HAS to be used by another calling script that called it, where the returned value is put into work by Get(ScriptResult) ...an attempt to make filemaker scripts behave more object'ish. There is a distinction between Halt Script and Exit Script[] (...admitted havn't I before substantiated this distinction and often used them casually)

Take a look at "help" at the second example where "Assign Letter Grade" shows how to use it.

An example of the use of script parameters that isn't far from the way you wish your solution to work is this:

http://www.spf-15.com/fmExamples/datePickWindow.fp7.sit

...please note that Shaun have made his template before Exit Script[] became paramtered with the introduction of fm8 and instead uses a global field ...which by this new features is made redundant.

--sd

Posted

Just some quick notes.

You can pass values in a script with a script parameter:

Right click your New JO button and select Specify Button, Click Specify and in the Optional Script Parameter box use your ID, ie. CompanyDB::Co_ID. Then use Get(ScriptParameter) in your set field script step. ex.

Go to Layout["Job Orders" (Job_Orders)]

New Record/Request

Set Field[JobOrders::Co_ID; Get(ScriptParameter)]

Pause/Resume...... Yada Yada Yada

You don't need all the Go To Field and copy/paste steps (you also don't need to Go to Field before using Set Field, the Set Field step is all you need). Do a search for ScriptParameter in the help file for more info.

Posted

Thanks to both you and Soren for all the help and suggestions. I have tried your suggestion (See attached file) and when I follow the script in debug mode I can see that the CO_ID has been captured. However, without the copy and paste commands the data does not get into the field. What am I doing wrong?

Al

Filter_set_up_new.pdf

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