Skip to main content
Question

AttributeCreator getting "Bad variant index in get" when setting default value to adjacent feature attribute

  • October 10, 2018
  • 10 replies
  • 19 views

Forum|alt.badge.img

Trying to set "WeekOfMonth" attribute for ALL features based on attribute "feature[-1]._4weekly_cycle" value, which today is "2". I am using the adjacent feature attributes capability in "AttributeCreator" transformer. Getting "Bad variant index in get" error in log file. If I set default value to "2", it works. Something not write with handling "feature[-1]._4weekly_cycle" value.

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.

10 replies

Forum|alt.badge.img
  • Author
  • 10 replies
  • October 10, 2018

screenshot1.png


Forum|alt.badge.img
  • Author
  • 10 replies
  • October 10, 2018

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • October 10, 2018

I think this could be a problem with the first feature, since there will never be a previous feature for the first feature. Try using a conditional formula for the attribute value to handle the first feature


Forum|alt.badge.img
  • Author
  • 10 replies
  • October 10, 2018

I think this could be a problem with the first feature, since there will never be a previous feature for the first feature. Try using a conditional formula for the attribute value to handle the first feature

Thanks, I tried using a conditional. That did not help.

 

conditional.png

 

 


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • October 10, 2018
Thanks, I tried using a conditional. That did not help.

 

conditional.png

 

 

I've looked at the workspace now, I don't think you want the adjacent attribute handling. Do you just want to add the calculated Week of the Month to every feature coming out the first part of the workbench?

 

 


Forum|alt.badge.img
  • Author
  • 10 replies
  • October 10, 2018

I think this could be a problem with the first feature, since there will never be a previous feature for the first feature. Try using a conditional formula for the attribute value to handle the first feature

I tried doing that. Did not change anything.conditional.png

 

 


Forum|alt.badge.img
  • Author
  • 10 replies
  • October 10, 2018
I've looked at the workspace now, I don't think you want the adjacent attribute handling. Do you just want to add the calculated Week of the Month to every feature coming out the first part of the workbench?

 

 

Yes. Just add the calculated Wek of the Month to every feature.

 

 


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • October 10, 2018
Yes. Just add the calculated Wek of the Month to every feature.

 

 

I would just use a featuremerger for something like this, so all features going into the requestor, your calculated Week of the Month to the supplier and use 1 on both sides of your Join, e.g.

 

 

 


Forum|alt.badge.img
  • Author
  • 10 replies
  • October 10, 2018

I think this could be a problem with the first feature, since there will never be a previous feature for the first feature. Try using a conditional formula for the attribute value to handle the first feature

I'll try using the featuremerger. Thanks for the example. I've never used FeatureMerger.

 

 


Forum|alt.badge.img
  • Author
  • 10 replies
  • October 10, 2018

I think this could be a problem with the first feature, since there will never be a previous feature for the first feature. Try using a conditional formula for the attribute value to handle the first feature

That worked! Thanks. I really appreciate your time in looking at it. I figured there was a better way to merge the data, I did not realize you could use the featuremerger that way without unique keys. Thanks.featuremergeradded.png