LookUpRecord Macro

kamran60

Registered User.
Local time
Today, 05:16
Joined
Nov 23, 2012
Messages
14
Hello All,

I have a Before-Update Macro that should input a value in REPORT-VI field of my AllocationFinancials table.

If AllocationFinancials.FinancialType <> "Amortization" Then
LookUpARecord in VISAs
Where Condition AllocationFinancials.Title=VISAs.Title
Alias

SetField
Name AllocationFinancials.Report-VI
Value VISAs.VoteItem
// Report-VI equals to VISAs.VoteItem where AllocationFinancials.Title=VISAs.Title

Else

SetField
Name = AllocationFinancials.Report-VI
Value = "S"

Endif

The problem I am getting with this is that when AllocationFinancials.FinancialType <> "Amortization", the AllocationFinancials.Report-VI field is just empty. The AllocationFinancials.Report-VI cannot be empty because VISAs.VoteItem is never empty. Any suggestions or tips would be immensely greatful!
 
Try moving this to After Update Event.

Dale
 
Unfortunately it did not work...this is what I wrote in After-Update:

If AllocationsFinancial.FinancialType = "Amortization" Then
EditRecord
Alias:

SetField
Name=AllocationsFinancial.Report VI
Value= "S"

End EditRecord

Else:

LookUpRecord in VISAs
Where Condition: VISAs.Title= AllocationFinancials.Title
Alias:

EditRecord
Alias:

SetField
Name=AllocationsFinancial.Report VI
Value= VISAs.VoteItem

End EditRecord

EndIf
 
Did not work can mean a lot of things.
Error, No data stored, crashed, did nothing...........



Dale
 
Oh did nothing...in the Before-Change event, the ="Amortization" part worked but <>"Amortization" did not return anything....
 
Last edited:

Users who are viewing this thread

Back
Top Bottom