sammers101
Registered User.
- Local time
- Today, 01:03
- Joined
- May 11, 2012
- Messages
- 89
I'm trying to create a new record in the same table that is a copy of itself except the original would be regular, and the duplicated one would be foil
Basically if I insert a new Product, it checks if the product was a regular or foil card. If it was a foil, then Products.CreateNew runs, with test data and foil type, and should not run again
Heres what I have entered in the after insert section of my Products table:
If Products.Type="regular" then
RunDataMacro
Macro Name: Products.CreateNew
Parameters
Card = "test"
Rarity = "U"
color = "white"
and Products.CreateNew is:
Create Record In: Products
setField: Products.ProductName
value = [Card]
setField: Products.ProductCode
value = [Rarity]
setField: Products.Color
value = [Color]
setField: Products.Type
value = "Foil"
when I insert a product no error pops up, but createNew doesn't seem to have run, should I try to find the last record with lookupRecord? I'm not really sure how it works
Basically if I insert a new Product, it checks if the product was a regular or foil card. If it was a foil, then Products.CreateNew runs, with test data and foil type, and should not run again
Heres what I have entered in the after insert section of my Products table:
If Products.Type="regular" then
RunDataMacro
Macro Name: Products.CreateNew
Parameters
Card = "test"
Rarity = "U"
color = "white"
and Products.CreateNew is:
Create Record In: Products
setField: Products.ProductName
value = [Card]
setField: Products.ProductCode
value = [Rarity]
setField: Products.Color
value = [Color]
setField: Products.Type
value = "Foil"
when I insert a product no error pops up, but createNew doesn't seem to have run, should I try to find the last record with lookupRecord? I'm not really sure how it works