AnsweredAssumed Answered

Searching Records and Displaying Results

Question asked by netguykb on Jan 12, 2009
Latest reply on Jan 13, 2009 by Orlando

Title

Searching Records and Displaying Results

Post

I have a table the that Tracks various types of activities (Activities) in my CRM like application. I have created a script that performs various finds, and sets a few fields in a related table (My Activity Count). The problem them I am having is that when no records are found I get the message indicating this however the My Activity Count::TodayNum column never gets updated resulting in a value that mayhave been inputted days earlier. This ultimately confuses the end user in think they have actual activities. Here is the scrip I wrote. It would appear that after performing the "Perform Find []" function the last part of the script does not execute if my variable = 0 or "". Any help would help to determine the correct order and or additioanl functions for this script to work.

 

Enter Find Mode[]

Set Field [Activities::activity_date_due; Get (CurrentDate)]

Set Field [Activities::activity_assigned_to; Get (AccountName)]

Set Field [Activities::activity_outcome; "Followup Call"]

Duplicate Recod/Request

Set Field [Activities::activity_outcome; "Followup E-Mail"]

Duplicate Recod/Request

Set Field [Activities::activity_outcome; "Initial E-Mail"]

Duplicate Recod/Request

Set Field [Activities::activity_outcome; "Initial Call"]

Perform Find []

Set Variable [$today; Value:Get (FoundCount)]

IF [$today = 0 or ""]

 Set Field [My Activity Count::TodayNum;0]

ELSE

 Set Field [My Activity Count::TodayNum;$today]

END

 

 

 

 

 

 

 

 

 

Outcomes