September 10, 201015 yr Hello, In a script, I am trying to set a local variable as one of the fields of the most recently created record. What script step will get me the most recent record? Every record has a timestamp create field but I don't seem to find any appropriate script step that will get this done. Could it be as simple as: :Show All Records :Sort Records (Decending by timestamp) :Go to record [First] :Set Variable [$local; Value:Appropriate field]
September 10, 201015 yr It could be even simpler: Show All Records Unsort Records Go to Record [Last] Set Variable [$local; Value:Appropriate field]
September 10, 201015 yr Author I guess that's why they pay you the big bucks! Is this an efficient way to validate? Commit Records [skip data validation; No Dialog] Show All Records Sort Records [No dialog] (timestamp;decending) Go to Record [First] Set Variable[$PartNumCheck; Value:Products::Part Number] Go to Record [Next] Loop If[$PartNumCheck = Products::Part Number] Show Custom Dialog ["blah blah blah... back to order form"] Go to Record [No dialog; Products::Part Number = $PartNumCheck] Delete Record [No dialog] Close Window Exit Script [] End If Go to Record [Next; Exit after last] End Loop The Custom dialog box is purpose for avoiding FM validation.
September 10, 201015 yr Is this an efficient way to validate? No, certainly not in version 11. CustomValidate11.zip
September 13, 201015 yr Author That is a great way to validate. I would never have arrived at such a simple method. I could not, however, get your Custom dialog box to work. It's like it was stuck in a loop. If I entered info into the diag box and then tried to leave the unique field, it falsely found an existing record. I'll keep trying to figure it out, but thanks so much. I hope other newbs benefit from it too
Create an account or sign in to comment