4 Replies Latest reply on Mar 28, 2012 4:34 AM by millie

    Using portals to enter list of calendar dates

    millie

      Title

      Using portals to enter list of calendar dates

      Post

      Hi. I would like to create a function for users to enter a list of dates within a record for advertisements to be placed in various publications with the advertisement deadline date appearing beside this.  Both sets of dates need to be entered separately as they cannot be calculated - but they need to appear together so that it is clear by viewing that each deadline relates to each publication date.

      Our sales team need to enter anything from 1 single insertion date and copy deadline to maybe 20 or 30 consecutive dates for larger campaigns.

      Is there a way of doing this within a portal or any other way so that I don't need to create a selection of fields that are always visible with the maximum number of possible entries also always visible?

      Could this be done using portals that expand in size as new lines are added?

      Many thanks for your help.

        • 1. Re: Using portals to enter list of calendar dates
          philmodjunk

          A portal to a related field seems the best approach for what you want. You can set up a relationship like this:

          Advertisements::__pk_AdvertID = AppearanceDates::_fk_AdvertID

          __pk_AdvertID would be an auto-entered serial number and you'd enable "allow creation of records via this relationship" for AppearanceDates in this relationship. You'd define your pair of date fields in AppearanceDates.

          Then you can set up a portal to AppearanceDates and you can enter as many pairs of dates in the portal as you need to. You'd enable the scroll bar option on your data entry layout. For printing out the data for one or more Advertisements and their appearance dates, you can use a list view layout based on AppearanceDates with fields from Advertisements included in the header or a sub summary part and this will produce a format that will expand as needed to suit the number of appearance dates linked to a given Advertisements record.

          • 2. Re: Using portals to enter list of calendar dates
            millie

            Hi Phil

            I am sorry for the delay in responding to your post - I am not familiar with working with portals so needed time to look through my manual to avoid asking irrelevant questions.

            I have set up a new table for the insertion dates (named 'Insertion Dates') and defined the two date fields necessary within this table.  In my main table 'Purchase Orders' I have created a portal that shows related fields from 'Insertion Dates'.

            I was not sure of how the auto-entered serial number related to the creation of new records. I created the auto-enter serial number in 'Purchase Orders' called 'press ref' and created an edit box in 'Insertion Dates' and formed a relationship between these two.  In the relationship I enabled the Creation of Records Within This Relationship applicable to 'Insertion Dates'.

            I am obviously doing something incorrect as this doesn't work and the portal does not show any fields.

            Sorry, but I think I misunderstood something from your advice.  Please could you elaborate? Much appreciated!

            • 3. Re: Using portals to enter list of calendar dates
              philmodjunk

              and created an edit box in 'Insertion Dates' and formed a relationship between these two.

              That really can't be done. An "edit box" is a specific field format selected in the inspector to specfiy a field's format for it's use on a specific layout--it has nothing to do with relationships. Therefore you did something a bit different than that.

              What you should have done is opened Manage | Database | Fields and selected your new table, Insertion Dates from the drop down of tables. Then you'd create a field of type Number. Once you've done that, you'd click on the relationships tab and drag from this new field to press ref in your original table. Check this description against what you did and see if you missed a step or did something different here.

              I am obviously doing something incorrect as this doesn't work and the portal does not show any fields.

              What exact steps did you take to add the portal to the layout? Did you specifically add the date fields to the portal row when setting up the portal?

              Screen shots of your layout while in layout mode and of Manage | Database | Relationships my help me better understand where this went off the rails for you.

              • 4. Re: Using portals to enter list of calendar dates
                millie

                Thank you for explaining this so clearly, Phil.  Have done as you said and it all works great now.