Skip to main content
Solved

Trying to add an attribute to numerous records

  • May 12, 2022
  • 6 replies
  • 42 views

Forum|alt.badge.img+2

I have a process where I determine the last ID number used for two id fields using statistics calculator. I then use an aggregator to merge the two ID's. I then bring about 100 records from another table and am wanting to add these ID's to it. But what is happening is that the two ID's are just being added as another record instead. I have tried using variable setter & retriever but those didn't work at all.

Best answer by redgeographics

Try a FeatureMerger or FeatureJoiner, using the id field as your join key.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3699 replies
  • Best Answer
  • May 13, 2022

Try a FeatureMerger or FeatureJoiner, using the id field as your join key.


Forum|alt.badge.img+2
  • Author
  • 32 replies
  • May 13, 2022

Try a FeatureMerger or FeatureJoiner, using the id field as your join key.

I can't do that as what I am trying to do is add the id created as the new id for the 100 records.


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3699 replies
  • May 13, 2022

I can't do that as what I am trying to do is add the id created as the new id for the 100 records.

Aha, in that case you can use a Sampler to split off 1 feature that has the new id and merge that to the 100 other ones using a FeatureMerger or FeatureJoiner. You'll need to set the join key to the same value on both sides, so, for example, 1 and 1.


Forum|alt.badge.img+2
  • Author
  • 32 replies
  • May 13, 2022

I can't do that as what I am trying to do is add the id created as the new id for the 100 records.

Tried it. It just added the id as it's own row with the id field filled in and everything else is blank. This is what I am finding with everything else I tried also. Thanks for the idea though.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • May 13, 2022

I can't do that as what I am trying to do is add the id created as the new id for the 100 records.

Can you share a screenshot of your workspace? This should be easily possible, there may be some settings in the FeatureMerger you need to tweak in case of attribute conflict.

 


Forum|alt.badge.img+2
  • Author
  • 32 replies
  • May 13, 2022

I can't do that as what I am trying to do is add the id created as the new id for the 100 records.

I got the featureMerger working. Thanks for your help! That did the job.