1 Reply Latest reply on Jan 6, 2015 5:50 AM by philmodjunk

    Checkbox Query



      Checkbox Query


      Hi all

      I have a jobs table, which within that has a portal displaying quotes associated with that job (there could be more than one per job). The portal displays items from the Quotation table, so it shows the date, quotation number, value, client PO, and hours quoted fields.

      What I am trying to achieve is that there would be a click box or radio button beside each quote on the portal, and when selected it would make that quotation active. My intention is that then the quoted hours from this particular quote would then feed into the 'quoted hours' field on the jobs page.

      Also, to complicate matters, there could be a few quotes active per job, as the job might change in scope! So each active quote would add to the quoted hours.

      Just wondering what is the best approach?

        • 1. Re: Checkbox Query

          Add a field for that check box to your quotation table. Format it for check boxes with single value check box.

          One way to do that is to use a value of 1 as the single value, then resize the field so that only the check box is visible in your portal row.

          You can then get a sum of only the active related records through one of several different approaches:

          A relationship to a different table occurrence of Quotations can include a calculation field returning the same value as your value list matching to this new checkbox field in addition to the match fields used in your current portal. You can then use a calculation field with the sum function to compute your total of this new set of related records or you can use a summary field defined in quotations and added to your layout from this new portal to compute the total.

          You can add a on row filtered portal to your layout with this just mentioned summary field located inside the portal row. Define the filter to filter for only active related records.

          ExecuteSQL can use JOIN and WHERE to compute the same total.