Jump to content

linking text with a worksheet value


Recommended Posts

This will only work if the text is part of a Symbol.

 

Create a custom record format with a text field.

 

Create a block of text and make it a symbol. Edit the Symbol and select the text block. Choose Link Text To Record from the Modify menu. Choose your record and field.

 

Create a worksheet. Select a row (I alway start at Row 3 in case I want to add headers later) and rich click on the row Header.  Choose Database. From the Edit Criteria dialog box choose Record   "YourRecord"  is Present.  You should end up with the same number of subrows as you have YourText symbol instances.

 

In any column enter a formula of "=YourRecord.YourField"  If you used spaces in either the Record or Field names, you will need to use single quotes around each name.  Hit Enter. You should now see the text from each symbol instance. Click in the subrow (3.1, 3.2, etc) in the cell that has the data and edit the data. The changed data will show up on the drawing in place of the original text.

 

Ask again if you need more clarity.  Also check the Help for Link Text to Record, Worksheet Databases, and Records and Fields.

 

  • Like 2
Link to comment
  • 8 months later...
On 4/15/2019 at 5:05 PM, Pat Stanford said:

This will only work if the text is part of a Symbol.

 

Create a custom record format with a text field.

 

Create a block of text and make it a symbol. Edit the Symbol and select the text block. Choose Link Text To Record from the Modify menu. Choose your record and field.

 

Create a worksheet. Select a row (I alway start at Row 3 in case I want to add headers later) and rich click on the row Header.  Choose Database. From the Edit Criteria dialog box choose Record   "YourRecord"  is Present.  You should end up with the same number of subrows as you have YourText symbol instances.

 

In any column enter a formula of "=YourRecord.YourField"  If you used spaces in either the Record or Field names, you will need to use single quotes around each name.  Hit Enter. You should now see the text from each symbol instance. Click in the subrow (3.1, 3.2, etc) in the cell that has the data and edit the data. The changed data will show up on the drawing in place of the original text.

 

Ask again if you need more clarity.  Also check the Help for Link Text to Record, Worksheet Databases, and Records and Fields.

 

@Pat Stanford how can one read a value from a database and get that value into a Text field?

Link to comment

As @Peter Vandewalle says, that is basically the reverse of what a worksheet does. And there is not simple, built-in way to accomplish it. Especially since you are using summarized rows.

 

Is it "random" which row you need or is it always the same prefix and number? What are you going to do with the data in this Text Field? Do you just mean a cell in a worksheet? Or stored into a record attached to an object.

It is probably possible to write a script that will accomplish the data transfer you are looking for. It is just a matter of how much you need it. I am thinking using three fields, One to enter the prefix, one for the ID Number, and the third to return the value. That way you could enter different prefix and ID and get different results.

 

Without knowing exactly what you are trying to do I would estimate at least 5 to 10 hours of scripting time after getting complete and explicit on the fields you need to do. Is this an important enough task that you do frequently enough to make it work asking a stranger to spend that kind of time to help you out? 😉

  • Love 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...