<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.blackbaud.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>VBA/API</title><link>http://forums.blackbaud.com/forums/20.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP2 (Debug Build: 20611.960)</generator><item><title>Re: API: add table entries automatically.</title><link>http://forums.blackbaud.com/forums/thread/38020.aspx</link><pubDate>Thu, 13 Nov 2008 00:32:50 GMT</pubDate><guid isPermaLink="false">f90a95a0-00e2-4810-8af8-0bbdde08f853:38020</guid><dc:creator>Paul Black</dc:creator><slash:comments>0</slash:comments><comments>http://forums.blackbaud.com/forums/thread/38020.aspx</comments><wfw:commentRss>http://forums.blackbaud.com/forums/commentrss.aspx?SectionID=20&amp;PostID=38020</wfw:commentRss><description>&lt;p&gt;Thanks David. I implemented as you specified and it really worked . It is very much appreciated and in short span of time you replied which is great. I got one more question related to this.&amp;nbsp; Is that possible to check the code table entry before adding&amp;nbsp;. As you said we cannot use GetTableEntryID for&amp;nbsp;codetables which are not in &lt;font color="#008000" size="2"&gt;ECodeTableNumbers. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000" size="2"&gt;Is there any other way to implement this functionality of check code table&amp;nbsp;entry first&amp;nbsp; exists or not&amp;nbsp; and then add if doesnt exist .&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000" size="2"&gt;Looking forward for your kind reply&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#008000" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&lt;font color="#008000" size="2"&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;
&lt;p&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&lt;font color="#008000" size="2"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: API: add table entries automatically.</title><link>http://forums.blackbaud.com/forums/thread/37997.aspx</link><pubDate>Wed, 12 Nov 2008 08:19:55 GMT</pubDate><guid isPermaLink="false">f90a95a0-00e2-4810-8af8-0bbdde08f853:37997</guid><dc:creator>David Zeidman</dc:creator><slash:comments>0</slash:comments><comments>http://forums.blackbaud.com/forums/thread/37997.aspx</comments><wfw:commentRss>http://forums.blackbaud.com/forums/commentrss.aspx?SectionID=20&amp;PostID=37997</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;The only rights you need are those in admin, security and ensure that you have rights to the code table you are adding to. If you are a supervisor then this should not be a problem.&lt;/p&gt;&lt;p&gt;&amp;nbsp;One thought is that your short description is too long. It has a maximum of 6 characters. In most cases you do not need a short description. It is just a few code tables that actually make use of this (constituent codes, states, countries, etc)&lt;/p&gt;&lt;p&gt;&amp;nbsp;David &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: API: add table entries automatically.</title><link>http://forums.blackbaud.com/forums/thread/37996.aspx</link><pubDate>Wed, 12 Nov 2008 00:46:52 GMT</pubDate><guid isPermaLink="false">f90a95a0-00e2-4810-8af8-0bbdde08f853:37996</guid><dc:creator>Paul Black</dc:creator><slash:comments>0</slash:comments><comments>http://forums.blackbaud.com/forums/thread/37996.aspx</comments><wfw:commentRss>http://forums.blackbaud.com/forums/commentrss.aspx?SectionID=20&amp;PostID=37996</wfw:commentRss><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;Thanks for your reply. I implemented your code in C# which is given below , but when im trying to use AddEntry method&amp;nbsp;its unable to add that entry to database . Its always showing&amp;nbsp;&amp;quot;&lt;font color="#a31515"&gt;Unable to add entry&lt;/font&gt;&amp;quot;&amp;nbsp;. Could you please help me with this. What kind of users can use AddEntry method successfully. I mean what special permissions that user should have to add the entries. Or do i need to make any changes to get this working.&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;font size="2"&gt; tblLookupForm = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt;.Empty;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; sShortDes = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;see this working&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;font size="2"&gt; codeTable= 32;&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;font size="2"&gt; (!oCodeTableLookupHandler.AddEntry(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;true&lt;/font&gt;&lt;font size="2"&gt;, codeTable, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ref&lt;/font&gt;&lt;font size="2"&gt; sShortDes, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ref&lt;/font&gt;&lt;font size="2"&gt; sShortDes, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ref&lt;/font&gt;&lt;font size="2"&gt; tblLookupForm))&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;outputerror = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Unable to add entry&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;else&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;{&lt;/p&gt;outputerror = outputerror + &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;lt;br/&amp;gt;Successfully added&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: API: add table entries automatically.</title><link>http://forums.blackbaud.com/forums/thread/37964.aspx</link><pubDate>Tue, 11 Nov 2008 11:00:10 GMT</pubDate><guid isPermaLink="false">f90a95a0-00e2-4810-8af8-0bbdde08f853:37964</guid><dc:creator>David Zeidman</dc:creator><slash:comments>0</slash:comments><comments>http://forums.blackbaud.com/forums/thread/37964.aspx</comments><wfw:commentRss>http://forums.blackbaud.com/forums/commentrss.aspx?SectionID=20&amp;PostID=37964</wfw:commentRss><description>&lt;p&gt;The ECodeTableNumbers enum is just the numbers of standard (not user defined) code tables. You will not find your code table in this enum. However if you want to add an entry to a code table you need to use the following code (you will need to translate the VB.NET to C# but it is pretty straight forward -&amp;nbsp; you will just need to handle the &amp;quot;optional&amp;quot; parameters)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; Public Sub addToCodeTable(ByVal shortValue As String, ByVal longValue As String, ByVal codeTable As Integer)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim tableLookupHandler As CTableLookupHandler&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableLookupHandler = _REServices.CreateServiceObject(bbServiceObjects.bbsoTableLookupServer)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableLookupHandler.Init(_SessionContext, _CodeTableServer)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oTableLookupHandler.AddEntry(True, codeTable, shortValue, longValue)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableLookupHandler.CloseDown()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableLookupHandler = Nothing&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: API: add table entries automatically.</title><link>http://forums.blackbaud.com/forums/thread/37963.aspx</link><pubDate>Tue, 11 Nov 2008 01:17:41 GMT</pubDate><guid isPermaLink="false">f90a95a0-00e2-4810-8af8-0bbdde08f853:37963</guid><dc:creator>Paul Black</dc:creator><slash:comments>0</slash:comments><comments>http://forums.blackbaud.com/forums/thread/37963.aspx</comments><wfw:commentRss>http://forums.blackbaud.com/forums/commentrss.aspx?SectionID=20&amp;PostID=37963</wfw:commentRss><description>Hi David, Im having similar problem. My problem is adding values to attributes where attribute itself has code table datatype. I got part to that of that code where im able to get the code table entry value for that attribute using &lt;font face="Times New Roman" size="3"&gt;
&lt;p&gt;Attribute Type Server which is given in api&lt;/p&gt;
&lt;p&gt;&amp;nbsp;But im unable to find whether the value exist in attribute or not. Because &lt;font size="2"&gt;GetTableEntryID is asking for &lt;font color="#2b91af" size="2"&gt;ECodeTableNumbers where i cannot find this attribute code table.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font color="#2b91af" size="2"&gt;&amp;nbsp;Can you help me with this issue.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Code is given below.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font size="2"&gt;
&lt;p&gt;BBREAPI7.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;REServices&lt;/font&gt;&lt;font size="2"&gt; rs = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; BBREAPI7.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;REServices&lt;/font&gt;&lt;font size="2"&gt;();&lt;/p&gt;rs.Init(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ref&lt;/font&gt;&lt;font size="2"&gt; _context);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;CCodeTablesServer&lt;/font&gt;&lt;font size="2"&gt; oCodeTableServer;&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;CAttributeTypeServer&lt;/font&gt;&lt;font size="2"&gt; oAttributeTypeServer;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;font size="2"&gt; llong = 0;&lt;/p&gt;oCodeTableServer = (rs.CreateServiceObject(BBREAPI7.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;bbServiceObjects&lt;/font&gt;&lt;font size="2"&gt;.bbsoCodeTablesServer)) &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;as&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;CCodeTablesServer&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;oAttributeTypeServer = (rs.CreateServiceObject(BBREAPI7.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;bbServiceObjects&lt;/font&gt;&lt;font size="2"&gt;.bbsoAttributeTypeServer)) &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;as&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;CAttributeTypeServer&lt;/font&gt;&lt;font size="2"&gt;;&lt;/p&gt;oCodeTableServer.Init(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ref&lt;/font&gt;&lt;font size="2"&gt; _context);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;oAttributeTypeServer.Init(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ref&lt;/font&gt;&lt;font size="2"&gt; _context); &lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;try&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;font size="2"&gt; lcodetableid = oAttributeTypeServer.GetAttributeCodeTableID(oAttributeTypeServer.GetAttributeTypeID(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Academic Program Description&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;bbAttributeRecordTypes&lt;/font&gt;&lt;font size="2"&gt;.bbAttributeRecordType_EDUCATION));&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;//here lcodetableid value is 1028 but i cannot find in &lt;font color="#2b91af"&gt;ECodeTableNumbers class &lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;int&lt;/font&gt;&lt;font color="#000000" size="2"&gt; lAttlong = oCodeTableServer.GetTableEntryID(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;(R) MASTER OF BUSINESS ACCOUNTING&amp;quot;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;, &lt;font color="#2b91af"&gt;ECodeTableNumbers.&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt;&amp;nbsp; --- cannot find this value . if can find this then i can use addentry method to add the entry to this attribute&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: API: add table entries automatically.</title><link>http://forums.blackbaud.com/forums/thread/29829.aspx</link><pubDate>Thu, 27 Mar 2008 13:09:58 GMT</pubDate><guid isPermaLink="false">f90a95a0-00e2-4810-8af8-0bbdde08f853:29829</guid><dc:creator>David Zeidman</dc:creator><slash:comments>0</slash:comments><comments>http://forums.blackbaud.com/forums/thread/29829.aspx</comments><wfw:commentRss>http://forums.blackbaud.com/forums/commentrss.aspx?SectionID=20&amp;PostID=29829</wfw:commentRss><description>&lt;p&gt;There is no automatic add to code tables value in the API. You have to first check to see if the value is in the code table and then if it is not you have to add it. If you are interested I can dig out some code for you.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;David&lt;/p&gt;</description></item><item><title>API: add table entries automatically.</title><link>http://forums.blackbaud.com/forums/thread/29827.aspx</link><pubDate>Thu, 27 Mar 2008 00:29:02 GMT</pubDate><guid isPermaLink="false">f90a95a0-00e2-4810-8af8-0bbdde08f853:29827</guid><dc:creator>Kraeg Mackenzie</dc:creator><slash:comments>0</slash:comments><comments>http://forums.blackbaud.com/forums/thread/29827.aspx</comments><wfw:commentRss>http://forums.blackbaud.com/forums/commentrss.aspx?SectionID=20&amp;PostID=29827</wfw:commentRss><description>&lt;p&gt;When doing an RE7 import you can opt (in code, using an object property, for example) to have table entries created automatically. Is there any way to do this when adding records using the API? Currently the only way I can see how to overcome this is when an error is returned (entry doesn&amp;#39;t exist in code table) the record has to be added manually.&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>