Avonelle's Tech Blog

Go Back

Saving a “Choice” value from a .NET app via an Active Form in Pivotal

Today’s Pivotal lesson relates to saving data via an Active Form from a .NET application. I’m updating an existing app, so I didn’t have to write any of the XML plumbing to communicate with Pivotal.

However, the table I’m trying to update has a field type not used in the rest of the app. Within Pivotal, this table field is defined as type “Choice Display 40”. As near as I can tell, this is just a hard coded list of choices. The list is basically an integer value with a text description. The integer value is what is stored in the field, so I assumed this is what I needed to pass to the Active Form.

However, this is not true. Instead, I must pass the text description, and it saves the correct integer value in the database. Weird.

From my vantage point, this is unfortunate, because I can’t figure out where these choices are stored in the database, and so I have to hard code them in my app. Now, if the text is renamed it could completely mess up the app. And since it doesn’t generate an error, that also means users won’t know. Yuck.

But at least I know why it wasn’t saving before.

Posted by Avonelle on Thursday, January 21, 2010.

Facebook Twitter DZone It! Digg It! StumbleUpon Technorati Del.icio.us NewsVine Reddit Blinklist Add diigo bookmark

Post a comment!
  1. Formatting options