Best answer

Stored Value Does Not Match Previous Value

  • 30 June 2022
  • 2 replies
  • 142 views

I am having some issues creating what I thought would be a fairly simple rotating roster which tags users on Slack.

The Zapier looks something like this:

  1. Trigger: Every Week
  2. Get or Set a Value (Assigns a value to a key called “Week”)
  3. Lookup Spreadsheet Row in Google Sheets (Searches a “Week” column for a number matching the value stored in the “Week” Key from the previous step.)
  4. Send Channel Message in Slack (Tags the staff who are rostered on that week according to the spreadsheet)
  5. Increment Value (Increase the “Week” key by 1, so that when it triggers the following week it searches and tags the users for that week)
  6. Set Value If - This is my problem step.

Once the value of the key reaches 9 I want it to re-set the value to 1. This is because the rotating roster only accounts for 8 weeks before it needs to go back to the beginning and start over. However, in the Set Up Action step for this I have the “Previous Value - Only set the value if the stored value matches this” set to 9.

I can confirm that the stored value is definitely 9 by reviewing the output in the “Get or Set a Value Step”. I have also confirmed it by adding a Lookup Table step afterwards.

Despite all this I am still receiving an error saying:

The app returned `{"message":"Stored value does not match previous value."}

 

Please help!

icon

Best answer by robschmidt 30 June 2022, 10:21

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +9

Hi @MitchBeam 

In this case, you can break it down to two actions, like at the end of the zap use a Filter step and if the value is 9 then add a consequent Set Value action that changes the value to 1. You will need to remove the Set Value If action before that.

Excellent, works perfectly! Thanks @robschmidt