Hi all,
I saw already a topic about the same thing (more or less):
http://www.mibuso.com/forum/viewtopic.php?f=23&t=22303
However, that solution does not fit for my situation.
My situation:
- a value (datatype = text with length = 250).
- another value that contains a filter. Examples of a filter: '<>abc' , 'abc|def' , etc.
My question: is there an easy way to check that the 1st value matches the filter in the 2nd value?
I'm afraid there is not. But you never know. That's why I ask it here.
Thanks for reading.
Answers
If both applies to the same field I would do it as ara3n said on the other topic. If not you'll have to give more details.
Salut!
Author of the book Implementing Dynamics NAV 2013
Cursos Dynamics NAV (spanish) : http://clipdynamics.com/ - A new lesson released every day.
Evert-Jan
Is it because you don't have any table containing all the possible values?
Salut!
Author of the book Implementing Dynamics NAV 2013
Cursos Dynamics NAV (spanish) : http://clipdynamics.com/ - A new lesson released every day.
I'm writing some generic code that will be used for many tables.
I only have a RecordRef variable as input.
And I know you can do a FIND on a RecordRef variable.
But the function that I'm writing can be called from the OnInsert trigger of a table.
So, setting a filter on the RecordRef and doing a FIND will not work, because I even don't know if that record does already exist.
I hope this is enough explanation.
Evert-Jan
If it is a generic function then use a generic table for your filtertest. It does not matter which table it is, the table just needs a field of the same type and length you want to check, thats all. Check in table 2000000041 (Field) for a table that holds such a field.
Define a table variable as some table and mark it as temporary.
Get the value from your Fieldref and store it in your Dummy table, Field x. Insert the record (thats why it should be temporary)
Apply the filter for field x and check whether you can now find a record.
FD Consulting
That must be the solution.
Evert-Jan