Hello
Trying to print quotation, combining data from "Quote", "Opportunity" and "Opportunity products" tables mostly. All otherwise well, but can't get the product table with <<Start>><<End>> to work.
Opportunities table: [ID] is the key. Related Opportunity products and Quotes show up on the app as they should.
Opportunity products: [ID] is the key, [Opportunity] Ref to Opportunities, [Product code] Ref to Products
Quotes: [ID] is the key, [Opportunity] Ref to Opportunities
My understading is that the table below should work, main table is Quotes :
Product | Description | Quantity | Price | Discount | Total |
<<Start: SELECT(Opportunity products[ID], ([Opportunity] = [_THISROW].[Opportunity]), TRUE)>><<[Product code]>> | <<[Description]>> | <<[Quantity]>> | <<[Price]>> | <<[Discount]>> | <<[Total]>><<[End]>> |
So the command should print rows from Opportunity products table, where reference Opportunity is the same as reference Opportunity this Quote is linked to. Yet the PDF does not print if the table is on it.
What am I missing here? All the help would be highly appreciated.
Solved! Go to Solution.
Alright, this was just about the [ ], should not be used within <<Start>><<End>> even if in documentation I think this is said to be necessary. This works now:
Product code | Description | Quantity | Price | Discount | Total |
<<Start:SELECT(Opportunity products[ID], [Opportunity] = [_THISROW].[Opportunity])>><<Product code>> | <<Description>> | <<Quantity>> | <<Price>> | <<Discount>> | <<Total>><<End>> |
Each quote is related to only one Opportunity, so is the table supposed to show only one Quote? Do these columns belong to the Opportunities table?
Thanks Joseph. Yes, each Quote belongs only to one Opportunity. The Opportunity Products link to Opportunity = each row in Opportunity Products table can belong only to one Opportunity, like Quotes. The Opportunity is the combining factor and master table. PDF is printed from Quote table (when new Quote is created), taking info from Opportunity and sub-table from Opportunity products.
By any chance.. do you have a security filter that filters rows away? What happens if you change the [_THISROW].[Opportunity] with a fixed value that exists? Does it bring any row then?
Kiitoksia Aleksi. No, there is no security filters applied to any of the tables in the app.
Eli toimiiko oikein, jos kokeilet kiinteällä arvolla?
Sori, ajatus hyppäsi. Ei tulostu myöskään alla olevalla, tuo "f2e1060d" on testi-Opportunityn [ID].
Product | Description | Quantity | Price | Discount | Total |
<<Start: SELECT(Opportunity products[ID], ([Opportunity] = “f2e1060d”), TRUE)>><<[Product code]>> | <<[Description]>> | <<[Quantity]>> | <<[Price]>> | <<[Discount]>> | <<[Total]>><<[End]>> |
Alright, this was just about the [ ], should not be used within <<Start>><<End>> even if in documentation I think this is said to be necessary. This works now:
Product code | Description | Quantity | Price | Discount | Total |
<<Start:SELECT(Opportunity products[ID], [Opportunity] = [_THISROW].[Opportunity])>><<Product code>> | <<Description>> | <<Quantity>> | <<Price>> | <<Discount>> | <<Total>><<End>> |
That's not the reason because the [ ] is almost a mandatory syntax.
Did you test the Bot when adding the parent and child records at the same time through the parent form view?
Just changed the [_THISROW].[Opportunity] to fixed value, and when it didn't work made blank template and started to build the table again. Only change was on the template, and removing [ ]s made it work. Doesn't make any sense to me either, but then I put back the [_THISROW].[Opportunity] and seems to work with both test opportunities as it should.
Okay good to hear.
User | Count |
---|---|
16 | |
10 | |
9 | |
8 | |
3 |