@Right Formula Question

Hello All,

I’m trying to capture the file name from the full path. I’m setting the field named FileAttachmentQ2 in javascript which has a value like

C:\temp\DB\qp\Final qp team doc on the web.doc

Now I have another field where I want to set the value to just the file name like

Final qp team doc on the web.doc

The formula for that field is:

FileName:=@Right(FileAttachmentQ2;“{}”);

FileName

But it does not seem to be working. I have the \ in quotes and curly brackets. Is that causing the problem. Can anybody help me with this.

TIA

Ki

Subject: @Right Formula Question

Try to remove the curly brackets by using @Right(FileAttachmentQ2;"").

Good luck

Subject: RE: @Right Formula Question

It doesnt let me save it like "".Ki

Subject: RE: @Right Formula Question

try:@Right(FileAttachmentQ2;“\”)

Notes needs the double \ to interpret it properly.

Subject: @Right Formula Question

When you use a \ in formula language, the formula sees the next sign as part of the text within the formula. Eg. If you want to use double quotes within a text that is opened and closed with double quotes you put a \ before the double quotes that needs to be seen as text:

FIELD ANY:=“"OK"” will result in a fieldvalue for any of “OK”

So if you want to use \ in a text within a formula you’ll have to state \.

FileName:=@Right(FileAttachmentQ2;“\”);

FileName

Regards,

René

Subject: RE: @Right Formula Question

Thanks for your posts. This worked but its giving me the whole path. The value I’m getting is

temp\DB\qp\Final qp team doc on the portal.doc

Its getting everything after the first slash how ever I want everything after the last one that is

Final qp team doc on the portal.doc

Any idea how to get that.

Thanks once again,

Ki

Subject: RE: @Right Formula Question

How Odd!If you know the filename is going to have the same number of \ you can:

FileName:=@Right(Subject;“\”);

FileName2:=@Right(FileName;“\”);

FileName3:=@Right(FileName2;“\”);

FileName4:=@Right(FileName3;“\”);

@Prompt([Ok];“”;"Here is the value " + @Text(FileName4) + “.”)

Then it gives just the last bit :slight_smile: But it’s a bit of a bodge.

Subject: RE: @Right Formula Question

all you need to do is this:

@RightBack(FileAttachmentQ2; “\” )

Subject: ONCE AGAIN… DESIGNER HELP…

Is it because every nerd turned to Notes,or because the champagne was

Chilian last Xmas ?

Subject: RE: ONCE AGAIN… DESIGNER HELP…

LOL, Oh how I would love too not to have to repeat everything I have said over and over again, but it’s partly up to you too.

Designer Help is one thing, standardized solutions and libraries is one thing, but do you think they are still clearer and easier to find and use than a verbally asked question, where the solution pops right in your face? The problem with documentation is that it needs documentation how it should be used. But you can be the missing link, PROVIDE the link to the documentation or solution when someone does not find it.

Get envisioned. Learn to accept the fact that the best you can do is to be nice to people. Throw away your counters and memories, and take everyone as if it would be the first time to you.

Subject: RE: ONCE AGAIN… DESIGNER HELP…

Thank you Mika. It worked like a charm! Appreciate you effort. Have a good day.

Subject: RE: ONCE AGAIN… DESIGNER HELP…

I think you wanted to thank Tom and not me :)But good to hear that it works now.

Subject: I disagree

Hi

Spend 5 years teaching your wife to press F1 before boring you with silly things, and you’ll understand… LOL !