cancel
Showing results for 
Search instead for 
Did you mean: 

Mobilink: Map column from custom query

2,347

Hello,

I'm trying to synchronise between en existing remote database to/from a consolidated (central) database. The table I'm trying to synchronise is a 'Download To Remote Only' mapping and has a custom query for the 'download_cursor' event. The custom query contains a join to a different table and selects a field (formno) from that table.

My mappings: alt text

Remote table: alt text

So in my situation: How do I map a column that doesn't exist on my consolidated table (but I get the column from my custom query) to my remote table? I don't see the option to add a custom column to the table mapping.

Thank you

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member

Hi Schoof

I think the following will work but I have not tried it:

  1. At the top of the window select the appropriate table mapping.
  2. In the bottom section, select the Download Strategy tab. On the tab set the strategy to Custom.
  3. At the top of the window select the Events tab. At the top right of the tab, select "download_cursor" in the event drop down.
  4. Write your download_cursor and if required your download_delete_cursor.

That's all. You should be able to ignore the column mappings page

Hope that works for you

Dave

0 Kudos

Hi Dave, Thanks for the answer.

That's what I tried to do initially, I tried to ignore the column mappings but when I try to synchronise I get the exception 'Server error: Message: Expecting 17 columns in cursor, but found 18. Table Name: OrderLine'.

And I thought this was because I have 17 columns mapped in the column mapping. I also tried to unmap them all but then I get the exception that my primary key is not mapped.

Former Member

Note that the table and column mapping UI is for you to provide the information needed for generating synchronization scripts. Since you are already using a custom download_cursor synchronization script you don't need to generate one, and thus you don't need to set up that column mapping in the UI.

If you are wondering why the "Custom" option is grayed in the pop-up menu in your screenshot, that is because those options are only applicable to uploads (eg. if you have consolidated column that isn't in the remote table).

0 Kudos

Hi, Thanks for the reply!

When I don't add any mappings there is no option to specify a download_cursor. When I add the mappings for a couple of columns but I ignore it, on synchronising I get the exception 'Server error: Message: Expecting 17 columns in cursor, but found 18. Table Name: OrderLine'.

Am I missing something here?