Compare a field of form with a field of a entity

Compare a field of form with a field of a entity

  

Hi

I need help with this please.


I need compare a field of a form with a another field of entity before insert to this entity for example:


if

SetDateInitialInput = GetSetDateInitialEntity

Cancel insert

Else

Insert date


I try everthing that i know but don´t work 


Hi Steven, Can you post a sample oml of what you're trying to do?

Gurvinder Singh wrote:

Hi Steven, Can you post a sample oml of what you're trying to do?


Thanks Gurvinder for you help, look i tried to before insert a dateinitial this compare with the dateinitial from database if both date are equal not save or not send the date to DB. Look this is my form:

And this is the logic, but logically dont work:

Summary: I need compare a field of a form with a field of a entity before to insert  

Hi,

Somebody can help me with this?

Hi Steven,


Are the fields inside a form? If yes, I think you're comparing the wrong field, it will [Form's_name].SetInitialDate or there can be mismatch of the data type. If it is just a practice solution, can you post the project oml file? You would get that file when you save the project (Ctrl+S).

Gurvinder Singh wrote:

Hi Steven,


Are the fields inside a form? If yes, I think you're comparing the wrong field, it will [Form's_name].SetInitialDate or there can be mismatch of the data type. If it is just a practice solution, can you post the project oml file? You would get that file when you save the project (Ctrl+S).

Hi Gurvinder,

I need compare a field of form1 for example, the name of field is:

SyntaxEditor Code Snippet

SetDateInitial

With another field from entity data, i trie to do this for example:

SyntaxEditor Code Snippet

Form1.SetDateInitial = GetSetUpDateRegisterById.List.Current.SetUpDateRegister.SetDateInitial

I need put that sentence on a IF so that before of insert a date, this do a validation, if true, the date can´t be inserted, if false the date can be inserted.

The first error of that sentence is Form1.SetDateInitial i can´t use that input for compare with a field of entity data. 

Actually I'am Trying outsystem with this little personal application. Thanks for help me.