Jump to content

That ugly ID


zab

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

Recommended Posts

I've been asking myself this question for a while. It's about the visibility of the ID. I have a value list calling my contacts from a different table. The first field is the ID and the second is a related field calling the cFullName. Everything is basic and works fine.

My question is: Is it standard to call a contact only from the ID ? Is it normal in a database to SEE that ID all over the place? I just think it's ugly , it has no other use (even if a very important one) than to relate the tables. But try to explain it to user. I'd rather have just a field showing the name of the contact and somehow hide the ID without confusing the user. Any meaningful thought about this ?

Thank you.

Link to comment
Share on other sites

You are right in that the User couldn't care less about a long, convoluted generic serial ID which the Developer uses to bind relationships throughout the solution. It can be hidden.

But keep in mind that, many times, a customer has an Account Number or ID number that THEY need to know or use for reference. This is particularly important when receiving payments from customers and they have more than one account. So the 'Developer' serial should be hidden but a customer account number should be seen and searchable.

Link to comment
Share on other sites

Yes but I still need to use the ID field, the number need to be entered and maybe hidden. I can't just use the name field and ignore the ID. Right?

Example an employee is assigned to a task. Do I need to use the id or just the name. I'm not sure how to do this without breaking the relation.

Link to comment
Share on other sites

Yes sure and the client have a project number assigned from the project table. It will be seen. My question is more about the employee. I need to assign them tasks, I need to compile their working time and they are all over the place. I'd like to hide the ID. Again can I only use the name (from a related table) and ignore the ID? Will it be related somehow "under the hood" or is it unavoidable to use the ID field?

I doubt my value list will work without the ID because I won't show me only the employees, but all the contacts.

So the next question is, What is the best way to hide an ID? I'd like the user to have the illusion of clicking only in the name field and select a name (with the "Show values only from second field" option.)

Link to comment
Share on other sites

So the next question is, What is the best way to hide an ID? I'd like the user to have the illusion of clicking only in the name field and select a name (with the "Show values only from second field" option.)

If you set the pop-up menu to only display the values from the second field, then the user is actually choosing an ID, but seeing the 'name'. So you want to put this pop-up menu on the foreign key field rather than the name. Then when the name is selected, the ID is entered in the foreign key field and the relationship established.

I doubt my value list will work without the ID because I won't show me only the employees, but all the contacts.

You could use a 'conditional' value list to display only the employees in this case. There are plenty of examples of this on the forum.

Hope this helps.

Link to comment
Share on other sites

Ok thank you all. So I'm struck with my ID. So be it. Still have one problem with my value list then. Let me put everything in context.

My tables:

*Contacts: Contain all common fields for all my contacts.

Field: Contact ID : SerialIncrement ( "CT000000" ;Serial# )

*Employees:

Checkbox list: Desk Employee, Shop Employee and more

Field: ContactID = Contacts::ContactID

FIeld: DeskEmployeesID = If ( PatternCount ( Type ; "Desk Employee" ) ; ContactID)

Field: ShopEmployeesID = If ( PatternCount ( Type ; "Shop Employee" ) ; ContactID)

Field: EmployeeNumber:

*Task

Field::) DeskEmployeeID

Field:: EmployeeNumber

Relations

Contact:: ContactID ------- employees::ContactID

employees::DeskEmployeesID ----------- Task::DeskemployeeID

In my task table. I want to use the field DeskEmployeeID but preferable EmployeeNumber to assign this task.

Task::DeskEmployeeID I use a value list this way: First field: Employees::DeskemployeeID and second field: Employees::cFulleName

The value list show me ONLY the ID of the desk employee and Fullname. It works perfectly.

But what I want is to use the EmployeeNumber as a value list.

If, in my value liste I select First field: Employees::EmployeeNumber and second field: Employees::cFulleName

The value list show me ALL the employees list. I only want the Desk Employee.

Any idea what can be wrong.

You'd save my life (at least a lot of time) but giving me a solution.

Thank you

Link to comment
Share on other sites

My tables:

*Contacts: Contain all common fields for all my contacts.

Field: Contact ID : SerialIncrement ( "CT000000" ;Serial# )

First off, it doesn't seem like you need a separate "Employees" table, if one Contact record relates to a single Employee record. I would keep all the fields in the Contacts table.

*Employees:

Checkbox list: Desk Employee, Shop Employee and more

Field: ContactID = Contacts::ContactID

FIeld: DeskEmployeesID = If ( PatternCount ( Type ; "Desk Employee" ) ; ContactID)

Field: ShopEmployeesID = If ( PatternCount ( Type ; "Shop Employee" ) ; ContactID)

Field: EmployeeNumber:

Next I would use a 'Type' field in the Contacts table to determine whether a contact is a 'Desk Employee', 'Shoe Employee' or whatever. You can still use a checkbox and a contact can be more than one employee.

In my task table. I want to use the field DeskEmployeeID but preferable EmployeeNumber to assign this task.

Lastly, I would use a conditional value list to display only the type of employees you want in the drop down on the Tasks layout. You should use the Contact ID as the match, not an Employee number, but you can easily set up a calculation field so that you can show the required info in the drop down.

See the attached file for more details. It probably isn't exactly what you want, but should point you in the right direction.

Matt

Forum_Sample.fp7.zip

Link to comment
Share on other sites

I think what you are looking for Zab, is a Pop-up Menu rather than a Drop-down menu. A Pop-up will select the ID but only show the name when you choose show only values from the second field.

Link to comment
Share on other sites

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