unknown variable error in a formula
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Community,
Can someone explain how I can fix this error?
Both the Country & route columns are coming into the W/F as V_String
Example the route for a delivery in France would be FR-140, the Country Code would be FR so I'm saying if Route is populated pull the first 2 digits FR if empty ( no delivery created) pull the country code
Can someone explain the fix here please.
TIA,
Karl.
Solved! Go to Solution.
- Labels:
- Off-Topic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Please note the two things I've indicated in your screenshot:
- The data type of [Country] is editable here. This tells me that the field [Country] is being created by this same Formula Tool. This also means that [Country] doesn't exist yet at this point (at least from the perspective of the Formula Tool).
- You are using [Country] as a variable at the exact same time that you're creating [Country]. This is the cause of the error.
If you are certain that [Country] is supposed to exist prior to this Formula Tool, you have to check the earlier parts of your workflow because it's being dropped along the way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yeap - as @Peachyco pointed out, your Country field does not exist yet, so if you put it in the same formula to make it exist, you're circular referencing. To avoid this, you can make the Country field first, then make a new field in the following + space referencing [Country] as it is made.
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks guys, yes I found in my select tool earlier in the W/F the country field was unchecked so not coming into that part of the WF / Formula.
I have fixed the issue - Thanks all for your help here as always....
Cheers,
Karl.
