PDA

View Full Version : End users being able to add to drop down lists.


MikeM
10-26-2009, 04:19 PM
How about the end users being able to add to a drop down list. I have some safety software with dropdowns, and if I double click the drop down, I can add content to it. This would be extremely useful, because when we develop the software, there is no way we can know everything the end user would want to add.

DominicW
10-27-2009, 05:04 PM
You can do this by making it a drop down list based on a object. The object you set in your relationships can just have one field . They can then add, delete and edit items in that list.

The object it is pulling from can be put in a navigation item called Customization or whatever. I think with the edit model function you can even hide it from the navigation so they would not see it as a separate item, it will appear just to be a customized list.

I use this in a sales lead software, the drop down list is for source of leads which could change daily depending on the sales company's marketing.

MikeM
10-27-2009, 07:15 PM
Hmmm...... may need a little more instructions on that :)

nealtucker
10-27-2009, 08:14 PM
You can do this by making it a drop down list based on a object. The object you set in your relationships can just have one field . They can then add, delete and edit items in that list.

The object it is pulling from can be put in a navigation item called Customization or whatever. I think with the edit model function you can even hide it from the navigation so they would not see it as a separate item, it will appear just to be a customized list.

I use this in a sales lead software, the drop down list is for source of leads which could change daily depending on the sales company's marketing.

Hi Dominic, Like Mike said, could you take us / me through the steps again, this is something I have been wanting and needing to do for along time, I tried to use the telephone object for a drop down but is dose not format correctly also you cannot delete any information once it is put in :(
cheers Neal

aussieokie
10-31-2009, 10:19 PM
Hi,
Drop down are pretty easy to create as long as you have everything in place. The first thing you need is a version of Tiger software that will allow you to define relationships. You'll also need to have a software program already defined and the software object that's going to hold you list also defined.

For example, you might have a software program called car ownership and you want to have a list of names that you can associate with each car. So that Joe owns car one and Fred owns car two and so on. In relational databases this is called a relationship. I'll get to them later.

So first of all you'd have to have a software object called CarsObject saved into your software program. In this you would have all the details you want to store for each car; make, model, engine size etc.

The next thing you need to do is to define a new software object called for example, OwnersObject. You then add a new editor in this case OwnersName, make it a text editor and save it.

Now it's time to fire up the software model part of TSB and set up the relationship.

When the model editor opens select on the software object button. Youll see another set of buttons. Click the + Object Library, you should see a list of all your software objects. In our example you'd select the one named OwnersObject and click OK. This adds the object to your software model and thus software program.

Once it's been added locate the object relations button and open the relationships window.
Now comes the fun part. You need to decide the type of relationship you want.


If one person can only own one car then this is a one-to-one relationship.
If one person can one or more cars this is a one-to-many relationship, even if they only own one at this time they may own another in the future.
If one or more people can own one car this is a many-to-many relationship even if the car is only owned by one person at the moment it may have multiple owners in the future.


Making the decision about these relationships is critical in relational database design.

In TSB the type of relationship you opt for and the parent and child object selection will determine how your data will be displayed.

If you select a one-to-one or one-to-many relationship for car owners and cars then the parent should be the OwnersObject and the child the CarsObject. Give the relationship a meaningful name and save it.

When you run your software you should now have an OwnersName (it might say something a bit different) in your Cars data entry window. By clicking on this you'll open the OwnersObject and by clicking new you can add the Owners Name. As you build your list of owners you'll end up with a list of owners that you can select from (one-to-many) or you'll have to add a new name if it's on-to-one. (I'm not sure how TSB defines primary keys if 2 people for example, have the same name). Haven't played with this aspect yet.

If on the other hand you want to have multiple owners for one or more cars you need to define the relationship as many-to-many. Also to ensure that you get a list of owners in the CarsObject you MUST make the CarsObject the parent object and the OwnersObject the child.

I hope this helps, and if I've made any mistakes :eek: in this could someone please point them out!!

While it sounds a bit complicated once you do it a couple of times it's pretty easy.

Cheers
Jim

Alton
11-01-2009, 07:07 AM
Very informative essay. Thanks for taking the time to write it up.

Alton

MikeM
11-01-2009, 09:18 AM
Thanks for the explanation Jim. My problem is that unless I make it a 1 to many relationship, I get this kind of data in the text box:
TigerSoftware.Builder.Client.UI.TestCountry_obj(c7 b4efc6-61fblah-blah-blah)

If I click the drop down, the countries are listed, but when selected I get the data above.

And if it is a 1 to many relationship, they can have more than 1 country listed.

TigerSoftware
11-01-2009, 10:06 AM
Thanks for the explanation Jim. My problem is that unless I make it a 1 to many relationship, I get this kind of data in the text box:
TigerSoftware.Builder.Client.UI.TestCountry_obj(c7 b4efc6-61fblah-blah-blah)

If I click the drop down, the countries are listed, but when selected I get the data above.

And if it is a 1 to many relationship, they can have more than 1 country listed.


That is because you haven't selected the default checkbox for one of the property editors. ;)


Thomas

MikeM
11-01-2009, 10:37 AM
That is because you haven't selected the default checkbox for one of the property editors.

Dooohhh.....You guys are so smart. Do we need to pick a default for every property editor? Then I wondered about how to edit the list, and came up with the idea of using a Setup in the Navigation structure and put all these hidden, user editable objects in it. Works great :)

Keep all these good tips coming....

TigerSoftware
11-01-2009, 10:59 AM
Dooohhh.....You guys are so smart. Do we need to pick a default for every property editor? Then I wondered about how to edit the list, and came up with the idea of using a Setup in the Navigation structure and put all these hidden, user editable objects in it. Works great :)

Keep all these good tips coming....

Just one property editor, Mike. Let's not get default crazy here. ;)


Thomas

MikeM
11-01-2009, 11:07 AM
Just one property editor, Mike. Let's not get default crazy here.

I think I meant do we need 1 default editor per each object. As in pick 1 as default amongst the many editors in the object.

I think my default is crazy anyways. After all it is the day after halloween :D

aussieokie
11-01-2009, 11:38 AM
Then I wondered about how to edit the list, and came up with the idea of using a Setup in the Navigation structure and put all these hidden, user editable objects in it. Works great :)


Mike,
Having a setup menu is a good idea. I have a number of Add To List Objects in two of my apps. The only thing that worries me is that if the end user decides they don't need that value, they might delete it and if that value has been used in other records then that tends to compromise the integrity of the databse.

If you hide the List Object by not providing a navigation name then the end user can add to the list but not delete anything. Depending on the user this can be:


a good idea because they have more control, or
a bad idea because of the integrity issue


I dunno, what does everyone else think :confused:

Cheers,
Jim

MikeM
11-01-2009, 01:07 PM
I just tested that. Put in some records, saved everything, and then went into the setup area and deleted a country. When I open the real record, the country name I deleted is still in the record form, but not in the selection list. So it seems it retains the value it was set with, even though it is deleted from the selection list.

I personally prefer a setup area, because the end user may spell something wrong, or as you indicated, enter something that is no longer relevant and no longer needs to be selected, BUT, perhaps the past records still need that value, and it appears it will be kept. If they are allowed to enter data with no means to control errors, or non needed items, the selection list could become pretty ugly if a lot of data is entered.

I guess an example could be charging out equipment or labour. These could be set up in the setup area and their values available in reports with calculations, but, eventually the equipment rate and labour rate is going to go up, so will need to be changed in the setup. Doing that, from my minimal testing, should produce accurate reports from past charges and from future charges with the new rates.

Sounds like it's right in my mind anyways :D

DominicW
11-04-2009, 04:53 PM
Hi,
Drop down are pretty easy to create as long as you have everything in place. The first thing you need is a version of Tiger software that will allow you to define relationships. You'll also need to have a software program already defined and the software object that's going to hold you list also defined.
.....

Cheers
Jim

Thanks, I missed the request for more instructions and it seems you hit it on the head!