• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Calendar link to form not running "When Shown"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calendar link to form not running "When Shown"

    Happy Monday,
    I have a app that shows a calendar of notes for our Payroll department. I connected the calender entries to an edit form so that the users can see the entire note and make any changes that might be needed. Next, I inserted an RPG program to check that a users ID matches the person who created the note so that they could only make changes if they created the note. In behaviors, I have tried inserting the RPG program in the "When shown" section of the Edit form, but it doesn't seem to be running the program. I even tried changing the nabInfo variable to verify that it was working, but it does not show up when the form is displayed. At what point in the behavior section is the data from the calendar available to run thru my RPG program? I tried running the RPG program inside the click event, after the filter. The program runs, but a GetFormChar('PNUSER') returns all blanks, even though the form displays the correct value.

    One thing to add to my wish list for Valence, is a way to download an expanded behaviors list to a pdf or spreadsheet, so that I had a way to follow what steps the app is taking.
    Thanks,
    Bruce

  • #2
    I would suggest that you have the calendar data source return the created user ID. Then, on event click, set that value to an app variable named itemCreatedBy.

    Next, create another app variable named itemReadOnly that checks whether the itemCreatedBy app variable is not equal to nabIbmI. If it is not equal, it should return true. Otherwise, it should return false.

    Example App Var Expression:
    Code:
    if (appVar.itemCreatedBy !== appVar.nabIbmI) {
        return true;
    }
    return false;
    On your form widget properties, set Readonly > All Fields to the itemReadOnly app variable.

    By the way, we thought the show section didn't allow RPG calls, so we need to investigate whether it can be allowed or not.

    As for the wish list item, I actually think there will be a new feature in 6.4 that will help you with that.??

    Comment

    Working...
    X