Skip to main content
Solved

How update a column in a table with Variable Setter- Variable Retriever ?

  • March 28, 2023
  • 3 replies
  • 45 views

Hi community!

 

I would like update a column in my table with a variable.

 

For that, I put in a VariableSetter my value that I retrieve after a Tester and with a VariableRetriver I recall my variable, and I want to insert this value of this variable in all the lines of my Code_Comma column.

But it's doesn't work.

Capture d’écran 2023-03-28 154641Someone can help me please ? Thanks

 

 

 

 

Best answer by dustin

Instead of VariableSetter/Retriever, use a FeatureMerger instead. The 4 features would be fed to the Requestor port, and the single feature (where you would create your Code_Comma attribute), feed to the Supplier port. In the FeatureMerger, type '1' for Requestor and '1' for the Supplier. This will essentially force the Code_Comma attribute onto the 4 features.

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.

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • March 28, 2023

Two things about VariableSetters and Retrievers:

  • They do not always work well combined with FeatureCaching.
  • If you are using them, you need to make sure the setter is run before the retriever.

 

Another way to do this is to use a FeatureMerger, where you set the requestor and the supplier values to "1" instead of a value. This will add the attribute(s) of the lower stream to the features of the upper stream.


dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • 627 replies
  • Best Answer
  • March 28, 2023

Instead of VariableSetter/Retriever, use a FeatureMerger instead. The 4 features would be fed to the Requestor port, and the single feature (where you would create your Code_Comma attribute), feed to the Supplier port. In the FeatureMerger, type '1' for Requestor and '1' for the Supplier. This will essentially force the Code_Comma attribute onto the 4 features.


  • Author
  • 13 replies
  • March 29, 2023

thank you @nielsgerrits​ and @dustin​ !