You are viewing limited content. For full access, please sign in.

Question

Question

Using RA, how to add dates to multifield ?

SDK
asked on January 30, 2019

Hello

I want to add dates to a multifield (date type), but I get a error "Valor de campo incorrecto. [9017]"

My code

 

Dim ei As EntryInfo = Entry.GetEntryInfo(idLF, mySess)
Dim fvc As FieldValueCollection = ei.GetFieldValues

Dim lValues As List(Of String) = New List(Of String)
lValues.Add("01/31/2019")
lValues.Add("01/30/2019")
lValues.Add("01/29/2019")

Dim values As Object() = lValues.ToArray

fvc.AppendValues("Fecha de eliminación", values)
ei.Lock(LockType.Exclusive)
ei.SetFieldValues(fvc)
ei.Save()
ei.Unlock()

Template


 

Thanks.

 

 

0 0

Answer

SELECTED ANSWER
replied on January 30, 2019

Change lValues to be a list of Object instead of String:

Dim lValues As List(Of Object) = New List(Of Object)

This fixes the problem in my sample project.

1 0

Replies

replied on January 30, 2019

Use the DateTime .net class:

 

lValues.Add(New DateTime(2019, 1, 29))

 

0 0
replied on January 30, 2019 Show version history

Hi Robert,

 

Sorry, doesn´t work, same error.

 

 

0 0
SELECTED ANSWER
replied on January 30, 2019

Change lValues to be a list of Object instead of String:

Dim lValues As List(Of Object) = New List(Of Object)

This fixes the problem in my sample project.

1 0
replied on January 30, 2019

Yes Robert, with the change works ok.

Thank you for your help!!!

 

Regards.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.