Jump to content

John Caballero

  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About John Caballero

  • Rank
  1. John Caballero

    Exporting part of a record from a portal

    You'll need to have a unique record ID for every record in the related file, a global in the main file, and a relationship from the main file that's based on the global and the related file's record ID. Your button will set the global with the record ID of the related record which corresponds to the portal row that you clicked, then you'll have a Go To Related Record (show) script step that isolates the record that is based on the global-to-rec ID relationship, then you'll call the import script the 3rd file that imports the isolated record from the related record.
  2. John Caballero

    Newbie: unique field?

    Yes...I was presuming that your field name might actually be called FileName.
  3. John Caballero

    Duplicating records between databases

    Hi MD, If you'd set your Quote ID into a global, you could've used a constant-to-constant relationship to grab it from the Quote file and use the Set Field script step to set it into the ID field in the related file as your looped through the records. That's probably how I would've done it if I'd set up the files, but it sounded like you already had a certain architecture in place that you wanted to go with.
  4. John Caballero

    Newbie: unique field?

    I Per-Otto, If your calclulation is indexed... Create a global text field. Create a self-join relationship that has the global text field on the left and the calculation on the right. Create a number calculation that looks like: Count(self-join relationship::filename) When you create a new record, insert the candidate filename into the global - if the filename already exists, your Count calculation will show a positive value and you can act accordingly.
  5. John Caballero

    Duplicating records between databases

    Hi MD, Glad it worked out for you. Ugo - I hear what you're saying and almost suggested doing what you suggested. This just seemed to fit better what MD was asking to do.
  6. John Caballero

    script missing after cancel

    Hi Marco, It sounds like perhaps when the user clicks Cancel, they're taken to a layout that is a duplicate of the primary layout, and on this layout the button they click doesn't have the correct script linked to it. Check the layout name before your user clicks the button for the 1st time and then check the layout name after the user clicks the Cancel button.
  7. John Caballero

    Duplicating records between databases

    How about going to the related parts_list_items to isolate the set you want to duplicate and then importing those records into quotes_line_items and then setting the newly-imported records with the ID from your Quotes file to link it up?
  8. I'd stick with what you have.
  9. John Caballero

    Hiding and showing button in Form

    Yeah, but having multiple layouts that mirror each other creates a lot of extra work in the long run - if you make a change to one layout you have to make sure you reflect that change in its mirror. Eddy's suggestion requires only one layout and is a pretty common and accepted practice for maing things either show or hide on a layout based on some change in a value.
  10. John Caballero

    Sum Records/ CheckBox/Relationship

    Create a calculation in the related file that looks like this: Case(checkbox=whatever value you use,0,field you want to sum) Then from your main file, create a calculation: Sum(relationship::calculation)
  11. John Caballero

    Simple Script Help

    OK, in both files create a calculated number field (call it cConstant) that returns a value of 1 (when you go to Define Fields and select calculation, enter the number 1 in the forumla window and make sure the field is set to be a number). From your 2nd file (the Child file) define a relationship to the 1st file (the Parent file) that is based on the cConstant field in both files. This is called a constant-to-constant relationship. In both files create a auto-enter serial number field(this gives each record its own ID), called nID In the Child file create a number field, nParentID. Create a realtionship from Child to Parent that links nParentID (in the Child file) to nID (in the Parent file). OK, so instead of using the Name and Address fields in the Child file, you're going to create cacluated fields that get their value from the Parent file. In the Child file, create a calculated text field, called cName. When you do, you'll see at the top of the dialogue box a drop-down list which allows you to pick the data source for your fields - select the relationship that you just created to the Parent file and locate and select the Name field. Create a calculated text field for Address and do the same (obviously selecting the Address field from the Parent file). This means that any change you make to the Name or Adress fields in the Parent file will automatically be reflected in the Child file - no scripting required. To setup new records: In the Parent file create a global text field, called gID. Create the following script: New Record/Request Set Field (gID, nID) Perform External Script (you're going to access a script in the Child file which you will create shortly) Exit Record/Request Halt In the Child file create the following script (this is the script that you'll call from the script in the Parent file): New Record/Request Set Field (nParentID, constant-to-constant relationship::gID) Exit Record/Request
  12. John Caballero

    Linking 3 Databases

    Hi there, It it's important that your values be seperated by a comma, create a calculated text field in each of your files that looks like this: Substitute(jobnumberfield, ",","
  13. John Caballero

    Simple Script Help

    More specifics would be helpful. Which record(s) in the 2nd file needs to be updated? How do those records relate to one another?
  14. John Caballero

    what's sql's distinct for FM???

    Thanks for providing that DISTINCTion, Marz!
  15. John Caballero

    Perform Find On Portal [NeWbiE Q]

    You can check for the mode (find, browse, layout, preview) in your script. Basically you want the script to execute when not in Find mode, otherwise allow entry to the field. I don't remember which mode is Find (but no doubt, someone else does and will speak up soon enough), but put this in your script: If Status(CurrentMode)<>whatever Find mode is Your script steps Else Go To Field (which ever one you clicked on) Now it may be the case that you have one button for the entire row, if you do, you'll need to change that to several buttons (depending on how many fields you want to allow your user to search).

Important Information

By using this site, you agree to our Terms of Use.