Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Controlling cursor placement in portal row--mimic hierarchical outline display


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

Recommended Posts

Posted

I don't know where to start with this one. Inside a portal I want to control both where the cursor is placed and limit text placement by calculation. I'm trying to mimic an outline display akin to Word where based on some set of conditions, i.e., some predetermined level/hierarchy structure, the cursor indents accordingly and restricts the placement of text to the left of the cursor placement within the portal row.

 

In the past I've just used a calculation field placed on top of the text field in conjunction with some conditional formatting. I'm just wondering if anyone is aware of any other options to explore. Thanks in advance as always.

Posted

have a look at these functions: Get(ActiveSelectionStart) and Get(ActiveSelectionSize)

 

combine that with an OnObjectModify script trigger, you could pre-enter spaces/tabs into a field, then limit where a user can input data

  • Like 1
Posted

So I see that Get(ActiveSelectionStart) returns the current position of cursor while Get(ActiveSelectionSize) returns a number representing how many characters are selected but I'm not sure how to execute your suggestion. My first thought would be to create a script triggered OnObjectEnter where if a set of criteria was present, I could use the Set Field step to insert a set amount of spaces. But I'm not clear how I'd use either of those functions to prevent text entry to the left of those spaces.

Posted

The OnObjectEnter trigger allows you to exit the script with a result of False (0), which will abort the users entry. So, after every key press you could validate the current position of the cursor in the field, then either accept the entry or not.

 

There is no simple answer to what you are asking for, its going to take some work to put all the pieces together to get the effect that you want. I forgot to mention that there are also some script steps to set the active selection, which allows you to move the cursor in the field (use a selection size of 0 to do this).

Posted

I appreciate the response. For some reason I got the impression from your first response that it was a matter of just stringing together some script steps. I'll play around with all of this and see what happens. Thanks again!

Posted

boy _i_ not know whats going on here but _i_ NEVER can find the link for posting my Subject ..

 

HOW TO HIDE PORTAL RECORDS WITH PORTAL FILTERING ?? SUCH A SIMPLE TASK BUT WON'T WORK !!!!!

 

wrote administration and got directions BUT _i_ see NOTHING !!! ABSOLUTELY NO LINKS FOR POSTING !!!

 

 

 

rob

 
Posted

There is no need for yelling nor for double posting. You obviously have figured out how to post so if you describe specifically what you want then we can help you. Portal filtering and relational filtering both work quite well. :-)

Posted

Hi Robert, and welcome to the forums.

 

I deleted the other post.

 

As LaRetta stated, we do not allow double posting of questions.

 

If you need additional clarification, please feel free to contact me by private message.

Posted

I can't take a screen shot because i am on ipad right now but you must post questions in a specific forum. See right above on this thread where the title "controlling cursor placement is in large text? Right above it is the hierarcal structure. Small print says you are here:

FMForums > presentation layer > portals? If you step backwards by clicking Portals you will see New Topic button top right. It is large and grey in the white section just above the biggest black bar. WHEW!

So to view the various forums, select black tab at top that says forums, select site index, choose an appropriate forum and you see the 'new post' button once there. I know it can be frustrating when new but this is a great forum so do try again! :-)

  • 1 month later...
Posted

So, I've figured out how to indent the first line of text in a text field but I'm stuck on how to indent the subsequent lines. I thought about using an OnObjectKeyStroke trigger that would fire when a carriage return was keyed but I'm stuck on what the next step would be. Trying to dynamically insert a space by way of Insert Text/Set field replaces the entire contents of the field with a space. I even tried setting a variable that captured the contents of the field appended with a space but that creates a double return (the one that executes the script and the one added to the field contents by way of the variable). Is there any relatively easy way to do this?

Posted

I'm not sure this is relevant to what you are trying to accomplish, but have you looked into adding hierarchy via parent/child relationships? http://fmforums.com/forum/topic/72391-getting-more-out-of-filtered-portals-6-hierarchical-portal/

 

The double-return issue can be solved by exiting your triggered script with False (0), which will abort the users keystroke - read the dialog when you are attaching the script trigger to the object.

 

An important difference between Insert Text and Set Field is that Insert Text (and all other Insert*) script step interacts with the field on the layout, so if all text in the field is selected your inserted text will replace what was there, but if you first move the selection to a specific position, it will insert text at that point. Set Field, on the other hand, modifies the field internally, so the active selection has no impact - you are always replacing the entire field contents.

Posted

I'll look into the double-return fix when I return to this problem. But without looking too deeply into the above thread, I already have a parent/child hierarchical portal set up (as I understand it) that I'm trying to expand upon. At this point, I have a portal in which I can expand/collapse portal rows based on the parent/child relationship. But inside each portal row are two fields: (1) a single line header field and (2) a multi-line content field. I also have a calc display set up that automatically displays a roman numeral/capital letter/number/etc bullet point designation based on relative position and level within the portal. I wanted to expand upon this by dynamically indenting the header field and content field on the same basis but I can't really figure out how to extend the indent beyond the first line of a text field. I had calc display field set on top of these fields to achieve that effect but I wanted to see if I could execute this inside the text field via some workaround formatting. I don't even know if i want to go down this road as I might just want to indent the bullet point display as to preserve more text field space. But I also wanted to know if it could be done. 

Posted

... extend the indent beyond the first line of a text field...

I don't know how to do this either - this part will be tricky, if you can even manage it at all.

This topic is 4307 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.