Jump to content
Sign in to follow this  
Leoff

Window Title

Recommended Posts

Leoff

....hmmm, question...

I see the 'Set Window Title' as I create scripts. But, is there a way to set window titles to specific users? In other words if user 'A' signs on to a single location solution that they will see a different window name than user 'B' using the same solution with different privileges at a different location?

 

Hopefully this makes sense...much thanks!

 

Leoff smile.gif

Share this post


Link to post
Share on other sites
andygaunt

If you can capture or read information during the script you can set the window title.

 

So, you could use a series of If statements with the Get(Account Name) to set the window title.

 

Set this script as the startup script from the File Options and you should be in business.

 

Hope this makes as much sense! laugh.gif

Share this post


Link to post
Share on other sites
Leoff

...yes, indeed it 'makes sense'. Now I simply have to institute it!

 

Much thanks to you master Andy!

 

Leoff smile.gif

Share this post


Link to post
Share on other sites
Leoff

...and, although I have really been trying, I can't seem to figure out how to allow one user (let's say FD1) to be set to see the window I want them directed to... I assume the 'Get(AccountName)=FD1', but it's not letting me do it.

 

Any suggestions?

 

Leoff smile.gif

Share this post


Link to post
Share on other sites
Leoff

...whoops, I had a brain lapse! Obviously once I Get(AccountName), THEN I use the 'If' function...duh...please correct me if wrong...

 

Thanks...

 

Leoff smile.gif

Share this post


Link to post
Share on other sites
andygaunt

The Account Name is the name they use to log on with. So ;

 

If [ Get(AccountName) = "Admin"
 Set Window Title [Current Window; "Something"]
Else If [ Get(AccountNAme) = "Another"
 Set Window Title [Current Window; "Else"]
End If

I would be careful with making window name changes like this, because then targeting a specific window on a user session when each user can have the same window called something different could lead to some headaches for you.

 

Get that pad & pen out to process flow!!! wink.gif

Share this post


Link to post
Share on other sites
Leoff

....LMAO! Yes, "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad", "pen and pad",

 

I will say that a million times! Thanks...

 

Leoff smile.gif

Share this post


Link to post
Share on other sites
Leoff

...and, it does work like a charm! Thanks!

 

Leoff smile.gif

Share this post


Link to post
Share on other sites
FileMakin' Tom

Andy . . .

 

Could you explain this statement in additional detail?

 

Quote: "I would be careful with making window name changes like this, because then targeting a specific window on a user session when each user can have the same window called something different could lead to some headaches for you." Unquote

 

Would the layout name change then alter the

"Go to Layout" script step and require the same "If" statements as above? Interesting . . .

 

Tom laugh.gif

Share this post


Link to post
Share on other sites
andygaunt

Tom -

 

Gladly.

 

With 7 you have the ability to change window titles. Like anything new it is exciting to rename windows left, right and center.

 

Now, This in itself is not necessarily a bad thing. We can open a new window for a list view and call it list. We can have a search window open and call it search. Fantastic!

 

With multiple windows however comes new risks. You have to ensure you are targeting the correct window when running your scripts (or the user will end up in places they do not want to be). You also need to check to see if windows are already open. We dont want two "New Contact" windows open, or three "Search" windows.

 

So scripting comes into the fray to look for window names that are open and we can move to the correct window, open new windows etc.

 

This is easy IF we stick to specific names. Now add to the mix the ability for different users to have different window titles.

 

Starting to see the problem????

 

So, next best friend... pad & paper comes out to help the developer process flow things.

 

If you can keep a constant on certain types of windows like a main detail window you can then alter part of the name and still trap your scripts correctly.

 

For an example we have a main window that has a title of "Detail for > (Joe Smith) ", where the information inside the ( ) is dynamically set for the current record being viewed. This is different on every users machine as they are all looking at different records. We do have a constant of "Detail for >" which we can trap using PatternCount and therefore script correctly. Dont keep a constant and welcome to a world of messy scripting.

 

Let a window have multiple disconnected names and your scripting can become a serious headache.

 

Remember your next best friend!

 

Now, you mentioned Go To Layout script step... this is different to Select window and Change window titles. Layouts are statically set in the solution by the developer. But we now have the ability to go to a layout based on a name calculation (which is very cool!)

 

Does this help to clarify?

Share this post


Link to post
Share on other sites
harryglos

Hey Andy,

 

Your answer is really great... It’s clean, clear, concise, with just a hint of whimsy. So who wrote it for you?

 

And why are you trying to get FileMakin’ Tom as your “next best friend”. I’m his favorite! I even, almost, said something nice about him just a few hours ago in another post...

 

Harry

Share this post


Link to post
Share on other sites
andygaunt

Harry -

 

I REALLY...REALLY.....REALLY CANNOT WAIT TO NOT MEET YOU!!! smile.gifwink.gif

 

Seriously. It is now a driving force for me...truly!!!!

Share this post


Link to post
Share on other sites
FileSquire

Hey, two cents from a lurker

 

Try using a Custom Function to name your window per the layout name and user name. Maybe pass a paramenter for the related record group too.

 

"List view for Harry G on Mondo Corp Purchases"

 

You'd probably need a few different CFs to give you the variables involved?

 

Lurkingly yours,

 

Kevin Keister

FileSquire

Share this post


Link to post
Share on other sites
Leoff

...gee whiz, I am so delighted I brought this topic up! I feel like Cupid!!!

 

Harry, once you meet Andy...you WILL fall head over heels, he is one of a kind! A gentleman, a knowledgable man a caring man and more... Andy wants to promote FM to the world!

 

Thank you both!!!

 

Leoff smile.gif

Share this post


Link to post
Share on other sites
harryglos

Hi Leoff,

 

Whatever Andy is paying you, I’m sorry, even I know Andy better than that! Whatever Andy promised to pay you, for this gratuitous self serving period of praise and worship is the question bothering even the most novice member of our forum community! The last time i’ve seen such postulating was my first date with the semi beautiful Griffith twins!

 

What do you think. Just because Andy is not an Indian Chief he can speak without reservation. He closed the last PUG meeting saying “There will be a rain dance tonight, weather permitting. Now you tell me man, what’s that all about?

 

Everyone will tell you, ok a few may tell you, that I am the last person who would cast dispersion on a fellow forum member smile.gifsmile.gif but I must in full candor tell you this. Had it not been for poor vision at the time, Andy intended for "PUG" to end with the letter "B"... Now I’m not saying...........

 

Harry

Share this post


Link to post
Share on other sites
andygaunt

Harry -

 

I saw the Griffith twins just last week. They said that you had been following them around. Is that your idea of a date then!!! :eek: laugh.gifwink.gif

 

I know Tom has not come back showering you with praise and you are feeling a little lost over there, but don't hate the player, hate the game!!!

 

Leoof. You continue to shower praise as much as you like (and anyone else for that matter)

 

now...what are you trying to say about my drinking habits! :rolleyes:

Share this post


Link to post
Share on other sites
Leoff

...so much for playing Cupid! Unless it's a new drink mixing an ounce of humility with half an ounce of praise and a gallon of truth.

 

And, I was wondering what was in those 'special' brownies and chicken salad at the last meeting. Certainly I look forward to the next rain dance later this month at the next PUG get together. Will we see you there Harry? Or, are you fearful of the 'Chief'?

 

Leoff smile.gif

Share this post


Link to post
Share on other sites
Bush

I tell ya, those of us NOT in the Hurricane State are agog.

 

Learnin' something, but agog, nonetheless.

Share this post


Link to post
Share on other sites
FileMakin' Tom

Thanks Andy . . . and indeed I have a word of praise for Harry . . . It's just that I forgot it!

 

As to the FMPUB . . . I LOVE the idea and would certainly find a way to attend that! LOL

 

Tom

Share this post


Link to post
Share on other sites
Bush

Thanks for the hedzup, Andy. Unfortunately, that's kungfuclass night, they meet two hours away and it appears from the schedule to be mostly socializing -- I fail to see why you guys NEED a FMPuB!

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.

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  



×
×
  • Create New...

Important Information

Terms of Use