Requires the use of a Filter - Forum

Forum Navigation
You need to log in to create posts and topics.

Requires the use of a Filter

Please someone to explain the meaning of FILTER to me.

I have created an array and I fill it of dates but I don´t know how to get the information into array

Example:

CreateEmptyArray [nombrefinal]

ArrayAddItem [nombrefinal] [nombreobjeto]

when I write  to get information of array

[nombrefinal|element:0]

give me an error

The manual only appears  Requires the use of a filter

 

Thanks

@joaquinfdez

I have created an array and I fill it of dates

I do not know what commands you used to fill the array with 'dates' (there are many formats) ... so I will try and explain using just 'numbers'.

This works as expected ...

CreateEmptyArray [ArrayOfNumbers]

SetVar [ArrayOfNumbers(0)] 45
SetVar [ArrayOfNumbers(1)] 13
SetVar [ArrayOfNumbers(2)] 9
SetVar [ArrayOfNumbers(3)] 4

AlertBox "First Item in ArrayOfNumbers" "[ArrayOfNumbers(0)]" ""

... as does this ...

CreateEmptyArray [ArrayOfNumbers]

ArrayAddItem [ArrayOfNumbers] 45
ArrayAddItem [ArrayOfNumbers] 13
ArrayAddItem [ArrayOfNumbers] 9
ArrayAddItem [ArrayOfNumbers] 4

AlertBox "First Item in ArrayOfNumbers" "[ArrayOfNumbers(0)]" ""

when I write to get information of array

The easiest way to extract the content of an array item into a simple variable is to do this ...

SetVar [firstElement] [ArrayOfNumbers(0)]

[nombrefinal|element:0]
give me an error
The manual only appears Requires the use of a filter

This format is only used when you want the value of an array item to appear in a displayed object (e.g. Container or Headline or Paragraph or TextArea) ... you would set up these objects with something like ...

Your first element is [ArrayOfNumbers|element:0]

 

Try out an array of numbers first ... if it works as expected, and you have problems with dates, please post the commands used to populate the array with dates.

Hope this helps.

luishp has reacted to this post.
luishp

@joaquinfdez

added later ...

A more generic method of extraction would be ...

SetVar [thisElement] [ArrayOfNumbers([elementNumber])]

... where the simple variable [elementNumber] can be set/populated from anywhere else in your App.

luishp and asmat have reacted to this post.
luishpasmat

Thank you so much !! I´m learning a lot thanks to your explanations.

Eternally gratefull to you.