Jump to content
Salesforce and other SMB Solutions are coming soon. ×

GetRepetition


Rook2Q5
 Share

Recommended Posts

I'm using the GetRepetition calc for the first time in a long time and it's giving me a little aginaaaah! First of all, the 3-storage text field is called obpanelists. I'm out of room in my portal contact_test to include it on the "Contact" layout, so, clever me creates another layout -- "Enter Panelists Name," with the same portal, but containing just two fields: record id (called testID) and the repetition field, obpanelists. Back to Contact layout, user adds a new test, selects "Oral Board" from testCategory value list. Script trigger pops open the "Enter Panelists Name" window when user exits testCategory. User enters a name into each repetition field. Closes the window and commits the data on close.

 

When I go to my test detail layout to view the repetition entries, I get nothing but the commas between the repetition fields in my testexplanation calc below. This portion is part of a larger case statement calc; the repetition data are the only values not coming through.

 

testCategory = "Oral Board" ; TextStyleAdd ( "Oral Board Review - of 100 possible points:" ; bold ) & ¶ &

"(Avg. of 3 Panelist's scores, rounded to nearest tenth)" & ¶ &

TextStyleAdd ( " Panelists: " ; Italic ) & GetRepetition ( OBPanelists ; 1) & ", " & GetRepetition ( OBPanelists ; 2) & ", " & GetRepetition ( OBPanelists ; 3)

 

Appreciate your help.

 

Rook

Link to comment
Share on other sites

What happens if you add the table:

 

GetRepetition ( Sometable::OBPanelists ; 1)

 

Or the context of calculation is not right?

Link to comment
Share on other sites

Yes, checked that; and when the pop-up window opens I noticed that the record id is not the same as the active record I'm working with. Even though all relevant IDs are on the layout. Now when I use a plain "Go to Related Record" script sans pop-up window, it works perfectly. I appreciate you showing me where I've gone wrong on my pop-up window trigger script. Here's the code.

 

Open OBR Panelists code =

If

 

[ Contact_RelatedTests::testCategory = "Oral Board"]

Freeze Window

New Window [Name: “OBR Panelists”; Height: 50; Width: 20; Top: Get (WindowTop) +30; Left: Get(WindowLeft)

Go To Related Record [show only related records; From table: “Contact_RelatedTests”;

Using layout: “Test: Enter Panelists” (Contact_RelatedTests)]

Select Window [Current Window]

Show/Hide Status Area [Lock; Hide]

Set Field [Contact_RelatedTests::OBPanelists] //a post-entry Close Window button does that

//and returns user to original layout

Else

Go to Next Field

End if

 

Rook

Link to comment
Share on other sites

I finally got a working script; a bit cumbersome, but end result is success. If you can recom a sleeker script, much appreciated.

 

Open OBR Panelists code =

If

[ Contact_RelatedTests::testCategory = "Oral Board"]

Freeze Window

Go to Related Record [From table: "Contact_RelatedTests";

Using Layout: "Test Details (Contact_RelatedTests)]

Go to Field [select/perform; Contact_RelatedTests::TestID]

Copy [select; Contact_RelatedTests::TestID]

Adjust Window [minimize]

New Window [Name: “OBR Panelists”; Height: 50; Width: 20; Top:

Get (WindowTop) +30; Left: Get(WindowLeft)

Show/Hide Status Area [Lock; Hide]

Go to layout ["Test: Enter Panelists" (Contact_RelatedTests)]

Enter Find Mode[]

Go to Field [select/perform; Contact_RelatedTests::TestID]

Paste [select; Contact_RelatedTests::TestID

Perform Find []

Set Field [Contact_RelatedTests::OBPanelists]

Enter Browse Mode[]

Else

Go to Next Field

End if

 

Rook

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use