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

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

Recommended Posts

  • Newbies
Posted

Hi

I'd like to be able to display different types of contacts using different layouts. EG, There are 3 different types of contacts, each with their own fields that need to be seen.

Instead of having 3 contacts databases (which I've tried), I want them all to be in the one database.

Is there a way to automate a script so that it examines each record, and displays it with the correct layout?

(There is a field called "Type" which the script could use. eg. "if type=... then display using ...layout")

Any ideas would be much appreciated!

Cheers

Tom

Posted

I would try to make merge fields take care of the labels, and if poisble take care of the allocation of something could pass as the boxes around the gestalts.

But I would also think if it really is important to have the 3 types shown simultainiously in one layout, there should be payed some attention to GTRR's feature to make a new window.

Finally could a different structure be considered something as the third option mentioned in my reply to this thread:

http://www.fmforums.com/forum/showtopic.php?tid/185942/post/246628/hl//

--sd

  • Newbies
Posted

Hi

Thanks for the reply.

Merge fields won't work. And only one layout ever needs to be displayed at any one time (as one contact can only ever belong to one type).I'll explain the situation a little better.

All contacts fall into 3 categories. Each category has standard fields, and then specialist fields that relate to that type of contact.

The idea is that the layout changes automatically, according to what type of contact it is.

A practical example is, when you do a find on a persons name, their name will come up in the database with the correct information showing for that type of contact, instead of having to switch to the correct layout to see all their details.

Hope this clarify's it a bit.

Tom

Posted

Tabbed layouts with the actual tabs disguised seems to be the best solution I could think of for that purpose.

Now you're on fm8 and not fm8.5 this means that your unavoidable navigation buttons, need to have cut ups of a repeating field splayed over the the 3 tabs to facilitate such behaviour:

http://www.24usoftware.com/download/ScriptedTabControl.zip

To determin which of the tabs should be used, should you consider putting all the records fields into Count( one by one, so when only a handfull of fields holds values is it straight to tab one.

--sd

Posted

You might give Fabrice Nordman's approach a stab when you upgrade next time:

http://www.fmforums.com/forum/showtopic.php?tid/185604/post/247151/#247151

--sd

  • Newbies
Posted

hmm, its still not that right idea. That would then involve locking records - don't want to have to do that.

I liked David J.'s idea, posted below Fabrices', of recreating the side bar, and applying the script to that. I've tested that out, and that works fine.

I've also included my script into my find script, so that it displays using the correct layout.

I'm surprised that nobody has ever wanted to do this. It seems like a very useful feature. And I'm also suprised that nobody has ever wanted to perform a script automatically upon going to each new record.

A feature such as applying a script to a record seems as normal as entering in information into that record.

Thanks for the help guys. Much appreciated.

Tom

Posted

Hi Tom,

Soren just like to direct people to the most difficult explanations possible.

It's easy enough to tie layout choices based on field values into the navigation scripts. But it does require you to use scripts for all navigation. That means hiding the status bar and menu commands, and using buttons tied to scripts instead. This measure of security is a good idea anyway.

It would look like this:

If [ Type = "Work" ]

Go to Layout [ Work Contact ]

Else If [ Type = "Home" ]

Go to Layout [ Home Contact ]

Else

Go to Layout [ General Contact ]

End If

If that's your "Go To Contact Detail" script, you can use that as a subscript for your Find, Go to Next Record, and Go to Previous Record scripts. Then changes to the navigation rules can be done in one place.

You should be cautious about using this method, however. The interface could be a little schizophrenic if everything changes on it when switching records. I'd say it's best to keep most of the layout sections the same, and use this technique only for sub-sections.

Posted

and here comes the idea of switching tabs instead of layouts :(

To do this automatically, you can even use a trigger plug in such as EventScript or DoScript. They are free.

  • Newbies
Posted

Ideally, one wouldn't have to use tabs, and they wouldn't have to have different layouts, you could just have fields appear and disappear, move around, etc, but its all in the one layout. Would this not be easiest?

I have chosen to recreate the sidebar, and attach the change layout script to the Forward/Back buttons, which works fine.

There's only 1 small problem - I'm using a calculation - Get (FoundRecords), but it doesn't get found records, it gets total record count. Eg. I perform a find and it finds 10 records (I know this because its in the FMP toolbar) yet my calculation for get found records is the same as my get total record count.

Does anybody know why this possibly is?

Posted

Soren just like to direct people to the most difficult explanations possible

There are probably some fine arguments for being anti-merithocratic, but I think it's urgent to distinguise behavoiurs execised in our businesses and then what is done to let the questioner learn something. Vanity could perhaps frequently urge us to bluff a sense of wizzardry and engraciation by higher powers when dealing on behalf of our business model.

But - The question is then, to whom is it beneficial to continue such habits in forums like these?? Wouldn't it be better to show the pathes in our own sensemaking than, issue cascades of quick set and forget fixes, that when it comes to it could be classified as virtue?

Young men like Queue or Genx, havn't weared their beards long enough to see if the questioner really have enough stamina to ask for the reasoning behind ...and coundn't care less if anyone draws hasty and prejudical conclusions.

This question could be simplyfied to, is it a tutors job to make someone pass an exam on memorized fixes or instead to convey some sort of reasoning and motivate urge to learn more. Shouldn't we be conciencious enough to tell the questioner - that this isn't a degree mill and that some kind of thinking and sensemaking probably would come in handy??

To be honest, isn't it wexing for you to stumble over a solution, not knowing why it works???

--sd

Posted

I'm all for the "teach a man to fish" approach, but sometimes you seem to be putting people on a wild goose chase instead. If you really want to tutor, then leave Socrates to the philosophy students, and explain in plain terms the various solutions and the trade-offs for each.

Now, I have to get back to my wizardry... ;)

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