Тёмный

SetFilter or SetRange, what to use and when in AL and Business Central 

Erik Hougaard
Подписаться 10 тыс.
Просмотров 8 тыс.
50% 1

Find more information at my blog www.hougaard.com or follow me on / ehougaard
Source code can be found here: github.com/hou...

Опубликовано:

 

18 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 33   
@MrMark00024
@MrMark00024 2 года назад
Great video, this one threw me a bit when I was leaning CAL. Would be good to do one showing when to use Reset or Clear.
@chriswatson2407
@chriswatson2407 2 года назад
Thanks Erik. Still the best Pascal channel on yt....
@Hougaard
@Hougaard 2 года назад
Totally gonna quote you on that :)
@mauriciovillatoro9361
@mauriciovillatoro9361 2 года назад
@@Hougaardby far the best BC AL Channel.
@carstenhansen3979
@carstenhansen3979 2 года назад
SETRANGE: Both values included. With SETFILTER it is possible to exclude the limits. My favorite SETFILTER: SETFILTER("Ending date", '%1|%2..', 0d, WORKDATE);
@yuvsharma
@yuvsharma 2 года назад
Nice and great video on the impact of type checking in the longer run.
@govind5067
@govind5067 Год назад
Hats Off Errik sir, I am new in this field and i wanted to be like you;
@ByteKnightX
@ByteKnightX 2 года назад
Great video with good explanation! Finally I get the difference and will use it for building an app.
@1738RM
@1738RM 2 года назад
Ive never come across AL programming before, seems very interesting !! Nice video :D
@Hougaard
@Hougaard 2 года назад
Glad you liked it!
@phduck
@phduck 2 года назад
YOU FORGOT TO TELL THEM THAT SetRange ALSO IS MORE PERFORMANT THAN THE OTHER OPTIONS! But your points of using the power of type checking is of course correct.
@Hougaard
@Hougaard 2 года назад
So, are you, once and for all, as the product group official representitive here on RU-vid , stating that: The SQL SELECT statement created from SetRange is performing better than the SQL SELECT statement created from SetFilter?
@phduck
@phduck 2 года назад
@@Hougaard I am in no way in the authority to represent the product group. And I really hope we don't end up creating different SQL statements. But the runtime cost is cheaper since you don't have to parse the input text, does it matter in most cases? No, but let's find all arguments to steer people towards SetRange.
@Hougaard
@Hougaard 2 года назад
But if it only the parsing cost we're talking about, then that's less than the deviation of the latency of the subsequently SQL operation. The reason I didn't mention this in the video, is that there has been soo many urban legends surrounding this, going all the way back to Peter Bang.... Someone have talking with someone saying that setfilter is .... than setrange.
@klauskaan6320
@klauskaan6320 2 года назад
@@phduck I will buy the theoretical performance gain as my side argument in "why setrange is better!" :D
@BlackTigerAP
@BlackTigerAP 2 года назад
There is no difference in performance. SQL statements are identical.
@mauriciovillatoro9361
@mauriciovillatoro9361 2 года назад
Hi Erik, is there any difference between do GL.SetRange("Posting Date", D, D2 ) or do GL.SetRange(GL."Posting Date", D, D2)? Thanks.
@Hougaard
@Hougaard 2 года назад
No, but the first is nicer to read.
@mauriciovillatoro9361
@mauriciovillatoro9361 2 года назад
@@Hougaard Thanks.
@hassansadiq3106
@hassansadiq3106 Год назад
Can someone tell please, how can we check for duplicate records in a tabls having multiple primary keys and throw error?
@navnav3134
@navnav3134 Год назад
Dear Eric, How can we put the filter inside the filter pane?. for example onopen page put true inside filter pane for a boolean record, like saved view. Best Regards, NAV
@Hougaard
@Hougaard Год назад
That's just by adding a filter to record you're passing to page.run()
@navnav3134
@navnav3134 Год назад
@@Hougaard this will put the filter as background and we can not remove it. Anyway, I fix it by using the filtered record inside (settable view) function. Thanks for your reply dear. Nav
@mauriciovillatoro9361
@mauriciovillatoro9361 2 года назад
Hi Erik Nice Video, How do you Groups Records, like the "Group by" clause in SQL?
@Hougaard
@Hougaard 2 года назад
Only with the tree control, there's a video about that :)
@mauriciovillatoro9361
@mauriciovillatoro9361 2 года назад
@@Hougaard Yes, I saw that video. Thanks.
@lowefraser1324
@lowefraser1324 3 месяца назад
What about applying multiple filters? How is that achieved?
@Hougaard
@Hougaard 3 месяца назад
To the same field? With filter groups
@lowefraser1324
@lowefraser1324 2 месяца назад
@@Hougaard thank you, I was thinking of filtering the record on multiple fields, can you do that with set range?
@JPColeman73
@JPColeman73 2 года назад
Can it be imaginable to substitute setrange and setfilter in the future? Wouldn't it be easier to have something like the where clauses in sql? This would avoid having x lines with setfilter and setrange.
@Hougaard
@Hougaard 2 года назад
Several tables in BC are not SQL (virtual, temporary, CRM, CDS) so a common filter language still seems like a good idea.
@mauriciovillatoro9361
@mauriciovillatoro9361 2 года назад
@@Hougaard HI, do you think SQL queries instead AL, support could be possible 🤔 in the future for BC?
@Hougaard
@Hougaard 2 года назад
Never say never :)
Далее
OAuth authentication using Device Code Flow
17:37
Просмотров 2,8 тыс.
КОСПЛЕЙ НА СЭНДИ ИЗ СПАНЧБОБА
00:57
FlowFields, the superpower inside Business Central.
25:45
Writing My Own Database From Scratch
42:00
Просмотров 223 тыс.
AL Debugging for beginners in Business Central
23:39