Table from referenced items
Hello Podio I have a Product app (16000 products) with all our products in and then a CampaignProduct app which references the product app to make certain calculations that I dont want in the product app itself. I then have a Campaign app where I add the CampaignProducts and I would like to create a table that pulls in all the data like. I am using this markdown: var navn = @All of Navn;var varenr = @All of Varenr.;var detail = @All of Detail inkl. moms;var tilbud = @All of Tilbudspris ink/moms;var lines = [];for(var i = 0; i < navn.length;i++){lines.push(navn[i] + " | " + varenr[i] + " | " + detail[i] + " | " + tilbud[i]);};"Navn | Varenr | Detail | Tilbud \\\\n" +"--- | --- | --- \\\\n"+lines.join("\\\\n") Which works fine when I reference the same fields in the Product app (provides me with a nice table). HOWEVER, when i reference the CampaignProduct app it gives me something like this: Navn Varenr Detail Tilbud   Domaine Ste. Michelle Brut| 1002740| 139 | 119Tommasi, Valpolicella Cl. Superiore, Rafael| 1005970| 119 | 109Noble Vines, 337 Cabernet Sauvignon, Lodi| 1005684| 155 | 100 How can i get them to be nicely alligned in a proper table when i reference an app that references another app? The data is correct, its just formatted wrong.

  • Hey Rainer I couldnt for the life of me figure it out - but i just wanted to communicate the details in a globiflow email, and i figured out how to automatically build a detail table from the referenced items instead - so i accomplished what i wanted in a different way. Thank you for trying to help :) 
  • Hi Michael,there can be several reasons. I assume that there is a line break or hidden html code in one of the fields you pull from the CampaignProduct App. In your calculation fields in CampaignProducts - do you pull soemthing from a multiline text field in Products?As a first step you can try  lines.push((navn[i] + " | " + varenr[i] + " | " + detail[i] + " | " + tilbud[i]).replace(/\\n/g,""));If that doesn't help please share 2 screenshots of the calculation field where you create the table:one with the calculation for the correct table (where you pull from Poducts) and one with the other. Both screenshots should show the preview.Rainer 
This question is closed.