I am new to Servoy and begin to enjoy it’s flexibility. As far as I am concerned, these guys at Servoy are walking on water. Keep it up!
The responsiveness of the forum is first class so I decided to post my first question:
For purposes of customizing the new app that I started, I want to show the customer’s logo on every form. My approach would be to load the image from a database into a global variable using a method (suggested in the manual). Now how would I do that?
Westy:
Another approach would be to use the imageMedia property of a Label with no dataProvider.
Now you lost me. Can you elaborate?
Well, I guess I am looking to replicate the way Filemaker handles global fields. Is there a way to permanently store (media) data in a global data provider?
while label is selected double-click imageMedia property value
import and select desired image
click the “Designer” mode button
Well, I guess I am looking to replicate the way Filemaker handles global fields. Is there a way to permanently store (media) data in a global data provider?<
I am not sure why you want to use a global field. Alternatively, you could create a related Preferences table and keep the Logo in that table, using a one to one relationship. This approach would make it easy for users to change the logo if needed.
These are just two of many possible approaches. Hope this helps.
Westy:
I am not sure why you want to use a global field. Alternatively, you could create a related Preferences table and keep the Logo in that table, using a one to one relationship. This approach would make it easy for users to change the logo if needed.
I am developing a solution for people that are not very familiar with computers, so I am glad you mentioned ease-of-use. I would hate to tell a customer to go into directory xyz and replace file “logo.jpg” with their own logo. Too many things that can go wrong. I just love the fact, that the user can drag and drop an image file into a form and be done with it.
In fact I am using a preference table with company name, address, serial number, logos, etc. I thought about using relationships but because I would have to set one up for every form in which the logo shows (would I?) and performance considerations (are there any?) that there might be a more elegant way. Like most developers I am rather lazy
I thought about using relationships but because I would have to set one up for every form in which the logo shows…
Relationships are between tables not forms. So once a relationship is set up it is possible to use it with more than one form.
For example, in a Contacts table you could create a field named “One” of type integer and create a calculation of the same name “One” of type integer with a simple calculation of “return 1;” checked off as stored. That will give you your '1" value in each record of the “One” field. Then do the same in your Preferences table. When finished relate the two tables, field “One” to field “One”, and you will have a relationship to the preferences table that you can use on more than one form.
if youre preference table hold the company_name and the logo.
just make a relation to that preference table with on the left side a global and on the right side the company_name..
then when the users logs in set the global to the users company and you have a relation that can be accessed in any form to set the image.
but because I would have to set one up for every form in which the logo shows (would I?) and performance considerations (are there any?) that there might be a more elegant way. Like most developers I am rather lazy
If I can suggest.. I’m a lazy developer too …have a look on how to use a form as a controller for other forms… really easy … and this “controller form” is a nice place to show your customer’s logo, you design only once and you will have the logo displayed an all forms of your application that use this special form as controller.
Thx for everybody’s help. I have enough pointers now to last me for a few days.
Hey, I am tring to find out about the seminar in San Mateo next week. I have left messages with NL and US and a post in the training forum. I definitely want to go but I have start looking for flights really soon …