Temporary Tables, now you see it, now you don't in AL and Business Central

Поділитися
Вставка
  • Опубліковано 3 гру 2024

КОМЕНТАРІ • 36

  • @vossert
    @vossert 2 роки тому +1

    This explained exactly what I was looking for! Even though it was a late night session, I couldn't help a little smile on the struggle with the run page. Thanks again Erik!

  • @tkarlsen34
    @tkarlsen34 2 роки тому +1

    I know i'ts late to say this but thank you for all these videos. You saved me, your explanations are amazing and you're such a chill guy.

  • @anada1124
    @anada1124 3 роки тому +1

    Thank you, Erik. I learned new stuff again.
    It was interesting to see that even a super expert like you sometimes get lost about what you are doing :)

    • @Hougaard
      @Hougaard  3 роки тому +2

      That was stupid, but that's how it goes sometimes :)

  • @ashish786a
    @ashish786a 3 роки тому

    Thanks Erik, learning a lot from your channel

  • @antm6735
    @antm6735 Рік тому

    Erik, thanks as always for answering multiple questions with a single video. Q: at ~25:15 mark, you showed what appear to be Flowfield values (in "Net Change (LCY)" column), then you mentioned there be "...no way to plug it in...". Are we able to return "real values" (e.g., decimal, integer, boolean) of fields in a temp table made from a record that includes fields with values calculated as FlowFields? (seeing as how they're not real values in the original table)

    • @Hougaard
      @Hougaard  Рік тому

      You cannot have a temporary table flowfield get its value from a different temporary table.

    • @antm6735
      @antm6735 Рік тому

      @@Hougaard Thanks, and I see that it doesn't work via TRANSFERFIELDS as well. Without a flowfield designation on the field(s) in the temporary table but with a matching data type, am I able to assign the value of the (temp field(s)) from the source table when my code runs?

    • @antm6735
      @antm6735 Рік тому

      Better question: can I calc these fields, then store the resulting value as a variable?

    • @antm6735
      @antm6735 Рік тому

      NVM these questions Erik. I got it to work. Thanks

  • @marcusnordlund8486
    @marcusnordlund8486 3 роки тому

    Good, now I could tell our newest guy to watch this instead of me trying to explain but not as good as you :)

  • @Apellakarl
    @Apellakarl 3 роки тому

    Thanks Erik, for all the very usefull videos :)

  • @lucius1976
    @lucius1976 Місяць тому

    Any info out there how usage of temporary tables might impact the performance? Is it enough to have a separate own Middle Tier which does the load? For instance where you use temporary table of Sales Line in an API to get current prices back. IF all API request go on a seperate Middle Tier on a seperate server will the actual SQL-Server be impacted?

  • @chriswatson2407
    @chriswatson2407 3 роки тому

    Regarding the "can't plug the Temp Detailed Cust Ledg Entries" into the Temp Customer. Perhaps we need something whereby the use of the 'temporary' modifier create an 'empty BC instance' state. Then I can insert cust and insert Detailed Cust Led Entries and they are interconnected.

  • @dmitrijyudin9954
    @dmitrijyudin9954 2 роки тому

    Thank you, Erik.

  • @tetraquark2402
    @tetraquark2402 10 місяців тому

    An array of temp tables shares the same data and each element can have different filters.

  • @evald80
    @evald80 Рік тому

    Thanks for the video and these explanations. I think is better that the temp record behave like a normal table. I mean, if there is a duplicate key than throw an error. Do you know the reason why they changed and now let you insert the same record again and again?

    • @Hougaard
      @Hougaard  Рік тому

      It don't let you, have you tried to commit?

  • @michaelteusner4473
    @michaelteusner4473 2 роки тому

    Thank you Erik. I already learned much more from your videos, than from any book or any other online resource. I was hoping to find a solution for my "grouping" problem here. Coming from SQL I struggle to get a grouped list or webservice. Just to give you a simplified idea of what I mean: "Select item, Sum(price) from invoice group by item". To have that in a temporary table, to use it in a Listpage or interface would be awesome. Is that possible, or are there any other ways?

    • @Hougaard
      @Hougaard  2 роки тому

      Can be solved with flowfields?

    • @michaelteusner4473
      @michaelteusner4473 2 роки тому

      @@Hougaard That was my first idea, or what you call "Smart-Fields" in your video. But how do I get distinct rows?

  • @asifshahzad5178
    @asifshahzad5178 2 роки тому

    Hello Erik, how to linkup a page field with temp table using tableralation? another question, can we create action runtime in AL? ANy technique?

    • @asifshahzad5178
      @asifshahzad5178 2 роки тому

      I have to populate dropdown list through temp table? is there way? I am stuck in.

    • @Hougaard
      @Hougaard  2 роки тому

      Yes, from OnLookup trigger.

    • @asifshahzad5178
      @asifshahzad5178 2 роки тому

      @@Hougaard yes, i know but want to do without using triggers.

    • @Hougaard
      @Hougaard  2 роки тому +1

      But that does not make sense, because you don't have a global temporary table.

  • @RaiBilalHaider
    @RaiBilalHaider 3 роки тому

    Thanks, I requested you to make video on temporary tables

  • @CHIONETSEROSTEVEN
    @CHIONETSEROSTEVEN Рік тому

    how can use the idea of temporary tables in sales order subform which has sales line as source table. i would like to avoid direct entry in the the sales line so i make sourcetableviewtemporary true. but a lot of errors comes up like document NO.. must have A value, Document No does not exist etc. an error which does not come when i use visual sales line. the main idea is to enter quantity of multiple resources using custom page.

    • @Hougaard
      @Hougaard  Рік тому

      Business logic cannot work on temporary tables in that case.

    • @CHIONETSEROSTEVEN
      @CHIONETSEROSTEVEN Рік тому

      ALRIGHT THANK YOU @@Hougaard

  • @HarikrushnaSangani-k1i
    @HarikrushnaSangani-k1i 2 місяці тому

    Hello Erik, is there a way to retrieve data from a temporary table in APIs?

    • @Hougaard
      @Hougaard  2 місяці тому +1

      First of all, temporary tables only holds values within a session and the scope of the variable. You can use temporary tables in APIs, but you have to populate the table onOpenPage().

    • @HarikrushnaSangani-k1i
      @HarikrushnaSangani-k1i 2 місяці тому

      ​@@Hougaard I need to retrieve data from Azure Blob Storage, so I used the ABSBlobClient.ListBlobs method to populate data in the 'ABS Container Content' with the OnOpenPage(). However, I am not getting any records in the API response. When I inspect the record instance of 'ABS Container Content,' I see that all the records from the blob are present.
      Can you suggest why the records might not be appearing in the API response?

    • @HarikrushnaSangani-k1i
      @HarikrushnaSangani-k1i 2 місяці тому

      ​@@Hougaard I need to retrieve records from Azure Blob storage in a custom API. With ABSBlobClient.ListBlobs, I populate that data in the 'ABS Container Content' table using the OnOpenPage() trigger, but I'm not getting any records in the API. When I debug the record instance, it shows that all records come from Blob.

    • @HarikrushnaSangani-k1i
      @HarikrushnaSangani-k1i 2 місяці тому

      I need to retrieve records from Azure Blob storage in a custom API. I am using ABSBlobClient.ListBlobs to populate data in the ABS Container Content table using the OnOpenPage() trigger, but I'm not getting any records in the API. When I debug the record instance, it shows that all records come from Blob.