in

InaPlex Forums

Forums and downloads for InaPlex customers and partners.

When using Inaport to create alarms, how best to update CAL createdby field

Last post 04-07-2009 22:22 by SueBee. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-07-2009 2:41

    When using Inaport to create alarms, how best to update CAL createdby field

    Hello, I am using Inaport 7 to create alarms in GM8PE for our reps -- it is working great, with one hitch: the alarms are created with the cal.createdby field = MASTER. The result of this is that our reps (who don't have master rights) are not able to delete the alarms, which we want to allow them to do.

    It seems to me that I need to have each rep's USERID field overwrite the CAL.CREATEDBY field, but currently, I'm joining to the _Calendar table as the secondary table and I can't modify the CREATEDBY field since it is not available in that view.

    Do I need to use the CAL table instead? If so, what other updates do I need to do to preserve the business logic? Or maybe I run a second script immediately afterwards on the CAL table to update just the CREATEDBY field of the newly-created alarms...should I pursue that solution?

    Thank you for your kind assistance!

    -Sue Burke

    Sue Burke/IT
    The JESUS Film Project
    www.JesusFilm.org
    Filed under:
  • 04-07-2009 3:09 In reply to

    Re: When using Inaport to create alarms, how best to update CAL createdby field

    Hi Sue

    Slightly dodgy work around, but try this:

    1. add CAL as a child of _Calendar, with primary key and foreign key set to recid

    2. no need to set any match criteria, because the recid will uniquely identify the correct record

    3. do an update on CAL with the rep id mapped to createby

    What this should do is hit the same CAL record twice - once as "_Calendar" with full business logic, then again as CAL with no business logic.

    Make sense?

    I have NOT tested this, so make a backup before trying.

    Regards

    Admin

    Filed under:
  • 04-07-2009 20:22 In reply to

    Re: When using Inaport to create alarms, how best to update CAL createdby field

    Thanks! This worked beautifully! 

    (FYI - It wouldn’t allow me to choose ‘No Matching’ but I could choose ‘SQL Matching’ with SELECT recid FROM CAL WHERE recid = '#PARENTKEY')

     

    We sure appreciate the quick help,

    Sue Burke

     

    Sue Burke/IT
    The JESUS Film Project
    www.JesusFilm.org
  • 04-07-2009 20:50 In reply to

    Re: When using Inaport to create alarms, how best to update CAL createdby field

    No problem

    Sorry I was not clear about the matching. What I meant was that because CAL is 1:1 with _Calendar, you only need the primary key/foreign key criteria - you do not need to supply match criteria in addition.

    This is because matching is a two step process:

    1. Use the foreign key to identify records that belong to the parent

    2. THEN use the match criteria supplied to select the correct record.

    For a 1:1 table, step 1 is sufficient to uniquely identify a record.

    That said, what you have done is fine.

    Regards

    Admin

    Filed under:
  • 04-07-2009 22:22 In reply to

    Re: When using Inaport to create alarms, how best to update CAL createdby field

    Thank you for clarifying. That makes sense. This technique is very helpful and I'm sure I'll have occasion to use the concept again.

    Blessings,
    Sue

    Sue Burke/IT
    The JESUS Film Project
    www.JesusFilm.org
Page 1 of 1 (5 items)
InaPlex Limited 2011