Return Character

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
ci_loi
Posts: 46
Joined: Wed Aug 13, 2008 4:00 pm

Return Character

Post by ci_loi »

Is there a way to concat. a return character to a plain text attribute?

This is for plain text outgoing email formatting.

The only thing that seems to work is by going into the textual rules view and press the return key ("enter"). But AwareIM reformats this everytime I open the rule leaving me to have to do it all over again.

Is there a way I can just add \n or \r to my string?
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

When trying to build some HTML with rules, I was unable to use the apostrophe in a rule. So I added an attribute: SystemSettings.Apos that is always in context and available to use in formulas now.

Let us know if something like this works for you.

Tom
ci_loi
Posts: 46
Joined: Wed Aug 13, 2008 4:00 pm

Post by ci_loi »

Im not building HTML though. I am building a Plain Text message.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

I realize you are not doing HTML. I was giving an example of how you can store a literal in a SystemSettings attribute and use it in formulas to concatenate text together. In your case the literal would be /r or /n.

Tom
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Also check out the Library sample application -- notification called LoanOverdueEmail. It has an attribute called Message that shows an email message with line feeds and attributes built into it.

Tom
ci_loi
Posts: 46
Joined: Wed Aug 13, 2008 4:00 pm

Post by ci_loi »

The Library Sample is pretty much what I am doing right now (except mine is a little more complex since you can't do double references).

What is the type of the literal?
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Re: "What is the type of the literal?" - When I mentioned a literal, I was referring to your original question of "Is there a way I can just add \n or \r to my string?"

If you aren't trying to do what the library sample is doing, please describe exactly what you are trying to accomplish.

Tom
rocketman
Posts: 1252
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Post by rocketman »

Tom, I have a similar question. I've created a non aware BO and a very simila BO. The intention is to create a process to create instances in the new BO for every intance of the old BO. This is so I can do a lot of tidying up of the old - undisciplined data. I thought it would be good to hold addresses in a different format - one big text field instead of address1, address2, etc etc.

So part of my process says create customers with customers.address = oldcust.add1+oldcust.add2+oldcust.add3 but I've a feeling it will come out as 10 anystreetAnyDistrictAnytown instead if
10 any street
any district
any town

With VB scriot it was easy we just used CHR(13) in between the + so it would read oldcust.add1+chr(13)+oldcust.add2 etc etc

I've searched the manual but nothing come up about concatenation of strings
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Mo,

Not sure how you need to use it. If you just need to display it on a form & not edit it, you could use:

customers.address = oldcust.add1+'<br>'+oldcust.add2 etc

and then display it in a HTML cell.
Tom - V8.8 build 3137 - MySql / PostGres
rocketman
Posts: 1252
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Post by rocketman »

Hi Tom - GOD this forum server is slow today.

Your suggestion will work if I make the address field an html field I think. I'll try it later. Right now the best laid plans of mice and men .... My big idea just hit the buffers with an "Internal Error" notice and there's nothing in the logs to say why.

The process has 2 rules

find all oldcustomers
create customers for each oldcustomers with ......... and about 15 attribute assignments

I used the F3 rule entry assistant and the rule was accepted with no errors and I've visually checked it a dozen times.

The log tells me it finds the old customers ok, evaluates the second rule but then fails when executing the 2nd rule.

Hey ho - back to the drawing board.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

1) you don't have to make the address attribute an HTML type. One option is for it to be plain text type and just present it in an HTML attribute on a form.

2) re: Find / Create -- sometimes I use 1 process to call another. FIND in first process with CREATE in the second. The 2nd process would have a Process Input of oldcustomers.
Tom - V8.8 build 3137 - MySql / PostGres
rocketman
Posts: 1252
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Post by rocketman »

Well .... Not sure why (one for Aware support) but splitting the process as you suggested at least threw up some decent errors in the log viewer that I could work on instead of the one liner which just said "you failed"

All sorted now - thanks for the tip, Tom

PS ... it was all to do with the rubbish old data - like a 23 character postcode (that's a zip code to you).
Post Reply