Jump to content

This topic is 8001 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi there and thank you for showing interest...

I'm not at the level of creating good calculations, please help me out.

A Text Field contains: [color:"green"] Check This Little Van Thingy Out Please

I wish to have a calculation that takes all the words and then puts a '|P' at every space. Creating:

[color:"green"] Check

This

Little

Van

Thingy

Out

Please

Now I need a script for a button that puts each line into a different field.

also

When a sertain word like '[color:"green"]Van' occurs, it needs to be put in a specified field. When this happends: All the other words after it need to go into just 1 field with spaces in between: [color:"green"] Thingy Out Please

Each word has to be put into a field only once.

For me this is to difficult, perhaps you know what to do... laugh.gif

Posted

First you'll need some set up .

Create an layout with only destination fields on it.

The "special" field ( the "Van" field ) should not be on this layout.

Leave default tab order .

Create two global fields:

counter as number

gText as text.

Now create an script:

Parser script:

set error Capture [on]

freeze Window

Set field [gText, substitute(originalTextField, " ","

Posted

That's great help Dj !!!smile.gif

There are two miner things that needs adjustment.

1. When the amount of words are above the amount of fields (when the word "[color:"green"] Van" isn't used) the loop makes it start with the first/top field again replacing the contents.

A solution that could work for me is when the last field is reached; to put all the remaining words in there, to prevent the starting at the first field again.

2. Howcome words loose their ending "." or "-" with Insert Calculated?

[color:"green"]Dr.Drib. becomes [color:"green"]Dr.Drib

Many thanks !!

Posted

set error Capture [on]

freeze Window

Set field [gText, substitute(Substitute(Substitute(originalTextField,".","__"),"-","_"), " ","

This topic is 8001 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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