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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    MartieH 
×

Important Information

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