Reference a Label in a Component Form to fill it

I’m not seeing an actual reference to a QuotationPrice instance. How are you creating the instance of QuotationPrice? Did you drag and drop QuotationPrice onto the Quotation form? Did you dynamically create an instance in code?

You’re using a class name to try to access instance variables. That isn’t going to work. You need a reference to an instance of the class.

If, for example, you dragged and dropped QuotationPrice onto your Quotation form, then that component has a name on Quotation. Maybe something like self.custom_1? Find that name and use that as your reference, e.g. self.custom_1.subtotal.text

If you created the instance dynamically through code, then you have a reference somewhere to that QuotationPrice instance. Use that reference instead.

1 Like