234
Views
7
Comments
Solved
 The given key was not present in the dictionary in my Table Sorting
Question

Hi everyone 

i'm beginner , who trying to learn Outsystems . In Demo Table Sorting , i had some error but i can't fix it . It's normal when i sort ascending but it get error when sort descending

I think it related with "DESC" because when i put it away there is no error . 

Please help me . thank you a lot .


Untitled.png
2020-11-13 07-48-15
Khuong Truong
Solution

Hi Hieu,

As I see your attached image, I think the issue is about adding "DESC".

You need to add a space before like this " DESC".

The reason is that when no space the result of ClickedColumn + "DESC" will produce an incorrect attribute. 

For example: 

- When you click on Name to sort then ClickedColumn is {Employee}.[Name].

- After adding "DESC" it become {Employee}.[Name]DESC <== this is not correct

- It should be {Employee}.[Name] DESC => that's why need to add a space (" DESC").

Regards,

Khuong

UserImage.jpg
Bui Trung Hieu

Hi Khuong Truong,

I fixed it. I was careless, thank you so much .

Have a nice day

Regards,

Hieu

2020-11-13 07-48-15
Khuong Truong

Hi Hieu,

Glad that it helps.

Cheers,

Khuong

UserImage.jpg
Bui Trung Hieu

Hi Khuong,

I looking forward to learning more.

Regards,

Hieu

2024-08-27 11-35-25
Ajay Anthony

Check this https://www.outsystems.com/forums/discussion/20918/bug-report-and-resolution-for-the-given-key-was-not-present-in-the-dictionary/

Also I have attached an OML file for your reference on sorting, you can have a look.

Sort_PoC.oml
UserImage.jpg
Bui Trung Hieu

Hi  Ajay Anthony,

Thank you very much , I still have a lot to learn .

 Have a nice day

Regards,

Hieu

2020-11-13 07-48-15
Khuong Truong
Solution

Hi Hieu,

As I see your attached image, I think the issue is about adding "DESC".

You need to add a space before like this " DESC".

The reason is that when no space the result of ClickedColumn + "DESC" will produce an incorrect attribute. 

For example: 

- When you click on Name to sort then ClickedColumn is {Employee}.[Name].

- After adding "DESC" it become {Employee}.[Name]DESC <== this is not correct

- It should be {Employee}.[Name] DESC => that's why need to add a space (" DESC").

Regards,

Khuong

UserImage.jpg
Bui Trung Hieu

Hi Khuong Truong,

I fixed it. I was careless, thank you so much .

Have a nice day

Regards,

Hieu

2020-11-13 07-48-15
Khuong Truong

Hi Hieu,

Glad that it helps.

Cheers,

Khuong

UserImage.jpg
Bui Trung Hieu

Hi Khuong,

I looking forward to learning more.

Regards,

Hieu

2023-05-02 15-58-12
Sachin Subugade

Thanks for the solution! 😊

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