Jump to content

serial auto-enters


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

Recommended Posts

We require a user-friendly serial auto-enter in our orders table. Order are created by mobile users. Obviously, only the hosted file will be able to assign this number so that there are no duplicate serial values (it is NOT used as a relationship key...just a display value), all relationship keys are UUIDs.

 

At first I thought, "simple, just set to auto-enter serial on the hosted file only," but then realized that because of the round-trip issue, my iPad user would not receive the serial value.

 

Must I add a server-scripted process to populate serial fields and set the Device_ID to that of the server's? And then, two syncs would be required for a mobile user to receive this serial value?

 

Appreciate any ideas!

Barbara

Link to comment
Share on other sites

Barbara --

 

Good question.

 

I'm going to make these possible solutions sound a lot easier than they probably are, but here goes...

 

Have the mobile users create new records as they normally would, and maybe generate temporary order numbers at that time.

 

Then have them sync. During the "push" phase, those new orders will get sent to the server as they normally would. At that point the "real" order numbers would get assigned on the server, thus maintaining the sequence.

 

Now the fun part. Before moving on to the "pull" phase, wipe the mobile database, and reset the sync timestamps. Then initiate the "pull" phase. The mobile user should receive their orders, with the "real" order numbers. (The downside to this approach is that you are essentially introducing a round trip of the orders.)

 

Another option is to let the sync finish as it normally would. Then, on the mobile side, look for any orders that are missing their "real" order numbers. Call a script on the server, and pass it the list of temporary order numbers. Have the server reply back with the "real" numbers, and assign them on the mobile device. (The downside to this approach is that you would have to develop these new client and server-side scripts.)

 

So those are some options. Again, I'm making this sound a lot easier than it is, but I think you'll get the idea.

 

Good luck!

 

-- Tim

Link to comment
Share on other sites

I appreciate the thoughts, Tim. Wiping the mobile device made me a bit ill - too much data to resync (containers, especially).

 

Not a problem developing server-side scripts, and I believe that's where we're heading with this.

Link to comment
Share on other sites

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