Accessing Lookup Tables via API

Discussions related to order tracking development with the ProForm module.

Moderator: Phil Barton

czentman
Posts: 157
Joined: Tue Dec 02, 2008 12:02 pm

Re: Accessing Lookup Tables via API

Post by czentman »

Also, how do I change the default order of the fields. The first column in the table starts with address1? Why. How do I change the "layout"?
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Accessing Lookup Tables via API

Post by John Morris »

Lookup tables contain data that is NOT associated with a paticular order. I'm not sure I understand what your are seeing or expecting to see.
John Morris
Sr. Software Architect
SoftPro
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: Accessing Lookup Tables via API

Post by roteague »

czentman wrote:Also, how do I change the default order of the fields. The first column in the table starts with address1? Why. How do I change the "layout"?
You need to create your own columns, setting the DataPropertyName to the correct field in the datatable.
Robert
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Accessing Lookup Tables via API

Post by John Morris »

Please keep in mind that the current Lookup API does not support adding/deleting/updating the layout structure. That must be done via the user interface. The current API only supports data changes, not schema changes.
John Morris
Sr. Software Architect
SoftPro
czentman
Posts: 157
Joined: Tue Dec 02, 2008 12:02 pm

Re: Accessing Lookup Tables via API

Post by czentman »

Thanks. I knew about that dataproperty thing but I was trying to see if there was an easier way than having to reconfigure the whole table. So I think this setordinal is a little easier.

Anyway, my big issue now is the setting to distinct. I keep having several records appear for each actual entry. How do I distinct it?
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Accessing Lookup Tables via API

Post by John Morris »

We don't support a DISTINCT operation in the lookup table API.
John Morris
Sr. Software Architect
SoftPro
czentman
Posts: 157
Joined: Tue Dec 02, 2008 12:02 pm

Re: Accessing Lookup Tables via API

Post by czentman »

why do more than one come up per one record? It doesn't happen on the system one in the spadmin-lookups-order contact - person grid?
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Accessing Lookup Tables via API

Post by John Morris »

A screenshot of what you are describing might help me undertand better.
John Morris
Sr. Software Architect
SoftPro
czentman
Posts: 157
Joined: Tue Dec 02, 2008 12:02 pm

Re: Accessing Lookup Tables via API

Post by czentman »

Very strange thing happening. I have the API working exactly as need using the "Attorney" table. I had Chris upload/import a large amount of data into the a new table and we called it "Client". On the GetTable function of lookups, it gives a wierd exception error when I try to get the "Client" table. It's so strange because it works fine for the Attorney table but not the Client table. What could be the problem?
This is the exception error description "An error occurred while receiving the HTTP response to http://localhost/SelectServer/OrderTrac ... svc/select. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details."
I have it working fine for Attorney table already and this new Client table give me this error on the GetTable function "table = lookups.GetTable(TableName, spec)". What kind of security is different on this table that would cause this problem? I tried playing around with the profiles and didn't get anywhere.
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Accessing Lookup Tables via API

Post by John Morris »

How much data are you trying to send into the API? You may be timing out the connection. Can you try using smaller amounts of data? Does that make the problem go away?
John Morris
Sr. Software Architect
SoftPro
Post Reply