Jump to content
  • 0

TASK question: How to use the contents of a field to select the contents of another field in the record? (Text->Fieldname)


sfraden

Question

OK, so I need to make a task that will read in a text field in a record, process the text into individual parts (This much I can already do) and then use each part as a field name to get the actual data I need.

Example of a record:   

Field 'W1d1' contains text of "g1,g18,g47,g73"   I would separate the text into 4 vars, v1="g1", v2="g18", etc.

I then want to use the contents of v1 as a fieldname to get the contents of field 'g1'

Is this sort of conversion possible in a TASK?  I wish we could use arrays as fieldnames.....

SFraden

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1

Just to verify, do you mean that you want to distribute the content of the field w1d1 to the fields on the other table?

If we have a static amount of comma separated values on the w1d1, perhaps you can try using a variable to capture the initial value of the w1d1, then use some blocks to capture the content up to the first comma, save it to the first field, remove it on the string, capture the value up to the first string again, save it on the second field, and so on.

However, since you the intended to place those values on a separate fields, we cannot just loop it and you will have to manually create the field allocation for the whole task. 

 

The following are the blocks that may help you for this:

image.thumb.png.76d7483bf4141aa078ad11caf3577105.pngimage.png.7459564ed5452d2904bf5b9d16e8f2a7.png

image.png.030cdedc461be8103f544057912c0489.png

Link to comment
Share on other sites

  • 0
On 12/29/2020 at 11:01 AM, NiceDuck said:

Just to verify, do you mean that you want to distribute the content of the field w1d1 to the fields on the other table?
 

Not exactly, the content of field w1d1 are the names of other fields, seperated by commas.  Pulling it out is not the issue, its using the pulled out names as a fieldname to act on that  is the issue.

clarify:  Field w1d1 contains "g1"  i need to use that entry to access field g1.  Field g1 actually contains the information i need.

Link to comment
Share on other sites

  • 0
8 hours ago, NiceDuck said:

May I ask for a sample screenshot of your actual table and expected result? Im still confused on what you are trying to build

Im trying to find a solution, the table is not made yet.  It's moot now, found out you cannot use the contents of a field as a fieldname....

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   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.

Loading...
×
×
  • Create New...