Where is the ListInvert?

Can someone tell me where I can find the ListInvert action/function? It should be implemented according to the ideas section (Idea: array-list-functions).

Thank you.

Bo

Or you can iterate by List[Length-Counter+1] and append to another list.

Thanks for both solutions. 

I think for me this is the best option as I want to keep my function as small and simple as possible. By choosing this option I don't need to bother with an extra list and a structure.

That would be a nice feature however it is not implemented yet.

The best way I can think of right now is:

  • add a new integer attribute to the list (ID)
  • iterate the list and assign the ID = LastID + 1
  • Sort the list by ID DESC

Hello Bo.

The link you provided redirects to an error page.

What are you trying to accomplish?

Yes, I had the same problem. It seemed like the idea section of outsystems was down. Anyways, you should be able to view it again.

I have a text date, which is in day/month/year, but I need to convert it to year/month/day, so I split the text on "/" delimiter and want to invert the list. It's an function so I want to keep it small.

Yes, i can see the link now.

Using the FormatDateTime() function wouldn't do the trick?

The text date I have is from a website. I'm scraping data from a website including a date in the format of day/month/year. Which when we scrape it, it will be in text. And according to the description of the FormatDateTime() it tells me that it requires a datetime as input and outputs a text. Which in my case I have to do the opposite. I want to change the text date from the website into a real outsystems date.

You can use another built-in function to convert from text to date time.

Try using this: 

FormatDateTime(TextToDateTime(<your text>), "yyyy/MM/dd")

That would be a nice feature however it is not implemented yet.

The best way I can think of right now is:

  • add a new integer attribute to the list (ID)
  • iterate the list and assign the ID = LastID + 1
  • Sort the list by ID DESC

Or you can iterate by List[Length-Counter+1] and append to another list.

Thanks for both solutions. 

I think for me this is the best option as I want to keep my function as small and simple as possible. By choosing this option I don't need to bother with an extra list and a structure.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.