ARSperl

 view release on metacpan or  search on metacpan

html/manual/ars_MergeEntry.html  view on Meta::CPAN

		   1 , "00000000012345",
		   2 , "FOOBAR");
	if(($a eq "") && ($ars_errstr eq "")) {
		print "entry successfully over-written\n";
	} 
	else {
		print "failed to merge - $ars_errstr\n";
	}
      </PRE>

	<hr width="10%">

      <PRE>

	# note that "2" means "create a new entry"
	$a = ars_MergeEntry($ctrl, "HD:HelpDesk", 2, 
		            2 , "FOOBAR");
	if(($a ne "") && ($ars_errstr eq "")) {
		print "entry successfully created - $a\n";
	} 
	else {
		print "failed to merge - $ars_errstr\n";
	}
      </PRE>

      <P>Notes<P>
	<B>Note</B>: If you try to merge a diary field (to alter existing
	diary entries) you need to pass the <I>encoded</I> diary to this
	routine. See <A HREF="ars_EncodeDiary.html">ars_EncodeDiary</A>.
	<P>
	<code>mergeType</code> defines how the merge will happen if special
	field (ie. Entry-Id) already exists:
	<P>
	<TABLE BORDER=1>
	<TR>
		<TH>Code</TH><TH>Meaning</TH>
	</TR>
	<TR>
		<TD>1</TD><TD>Generate an error</TD>
	</TR>
	<TR>
		<TD>2</TD><TD>Create a new entry with a new entry id</TD>
	</TR>
	<TR>
		<TD>3</TD><TD>Delete the existing entry and create a new on in its place</TD>
	</TR>
	<TR>
		<TD>4</TD><TD>Update fields specified in the fieldlist in existing entry</TD>
	</TR>
	<TR>
		<TD>5</TD><TD>Generate a new entry id for all entries</TD>
	</TR>
	<TR>
		<TD>1024+num above</TD><TD>Allow NULL in required fields (not applicable for Submitter,
		Status or Short-Description)</TD>
	</TR>
	<TR>
		<TD>2048+num above</TD><TD>Skip field pattern checking</TD>
	</TR>	
	<TR>
		<TD>4096+num above</TD><TD>Ignore filter processing</TD>
	</TR>	
	</TABLE>
	<P>
	Refer to the Remedy Programmers Manual for further details.
		      <P>
        <a href="OO/form.html#merge">The Object Oriented ARSperl layer
			  tries to be a little easier to use.</a>
<P>
<I>ars_MergeEntry was introduced in version 1.46 of ARSperl</I>

<P>
<HR WIDTH="30%">
<P>
<A HREF="toc.html"><IMG ALT="&lt;--" SRC="arrow.gif" ALIGN=CENTER> Table of Contents </A>
<p>
<address>
Last changes to this page 20-Aug-2010 by tstapff<BR>
&#169; J.C.Murphy, J.W.Murphy, T.Stapff 1997-2010 arsperl@arsperl.org
</address>
</BODY>
</HTML>



( run in 0.777 second using v1.01-cache-2.11-cpan-39bf76dae61 )