Jump to content
Sign in to follow this  
Confused.com

making scripts

Recommended Posts

Hi

I am trying to convert a value that i have in my filemaker database into another one ie TT into 1!can i do this as a script button?

also we have already got a calculation in place that changes numbers into other numbers ie.2 into 1 so that it can add up how many 2s there are but when i try to put in the TT value it says it cant find the spcified field!

Please help as tearing my hair out over this!

Share this post


Link to post
Share on other sites

It would help to see the actual calculation formula. As it is, I can only guess that you did not put the string "TT" inside quotes.

Share this post


Link to post
Share on other sites

If I understand you correctly you want to change certain text that may be in a specific fields to a number?

So create a script:

If(field = "TT"

Set field(field, 1)

Endif

If you want it to loop through a found set or all your records:

Allow User Abort(Off)

Go To Record Request (First)

If(field = "TT"

Set field(field, 1)

Endif

Go To Record Request (Next)

Loop

If(field = "TT"

Set field(field, 1)

Go To Record Request (Next, exit after last)

Endif

EndLoop

[color:red]**** I would suggest that you make a back up of your file before trying this or any script that is changing data in many records.[color:red]****

Also, I wrote this off the cuff and most of my scripts require some adjusting. I rarely get it on the first try.

hth

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    Matt Cudmore 
×
×
  • Create New...

Important Information

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