AnsweredAssumed Answered

Portal with button that checks another table for status

Question asked by AppGuy on Jun 20, 2013
Latest reply on Jul 15, 2013 by AppGuy

Title

Portal with button that checks another table for status

Post

     Before I begin I did have another post but checked it as done so I can reposting since it's not working exactly how I expect it.

     Here is the last post: Portal with Unique checkbox per user

     I have attached my relationship graph..

     This issue I am having is... after a person signs in..  they click the review tab...  this currently goes to the peronnel_signin table with a portal from the jsa_portal. (Works fine)

     There is a button on the portal that I would like the person that is signed in to be able to review any of the rows in the portal.

     This kinda works.. they click the review button and it logs the review.  They next person comes and signs in and they see they record has already been reviewed.  It seems to be recording the review by jsa_portal instead of by personnel_signin..??

     Here is the script:

Allow User Abort [ Off ]
If [ IsEmpty(Touch_Rate::Touch_Rate_Check_SOP) ]

Set Variable [ $portal_id; Value:jsa_portal::id ]
Set Variable [ $personnel_id; Value:personnel_signin::personnel_id ]
Set Variable [ $jsa_id; Value:personnel_signin::jsa_id_sub ]
Freeze Window
                    Go to Layout
[ “Touch_Rate_Table” (Touch_Rate) ]
New Record/Request
                    Set Field
[ jsaportal_TOUCHRATE_review::_fkJSA; $jsa_id ]
Set Field [ jsaportal_TOUCHRATE_review::_fkPersonnelSignIn; $personnel_id ]
Set Field [ jsaportal_TOUCHRATE_review::_fkJSAPortal; $portal_id ]
Set Field [ jsaportal_TOUCHRATE_review::Touch_Rate_Check_SOP; "1" ]
Go to Layout [ original layout ]
                     

Else If [ Touch_Rate::Touch_Rate_Check_SOP = 1 ]
Show Custom Dialog [ Title: "Remove Touch"; Message: "Are you sure you want to remove this review?"; Default Button: “Yes”, Commit: “Yes”; Button 2: “No”, Commit: “No” ] If [ Get (LastMessageChoice) =1 ]

                     

Go to Related Record [ From table: “Touch_Rate”; Using layout: “Touch_Rate_Table” (Touch_Rate) ] [ Show only related records ]

Delete Record/Request

[ No dialog ]

Go to Layout [ original layout ]

End If

End If

      

Screen_Shot_2013-06-20_at_10.14.26_AM.png

Outcomes