Does anyone know if it's possible to set a field v...
# general
j
Does anyone know if it's possible to set a field value of a record based on a saved search? For instance, I have a saved search to determine which items on my web store are eligible for a promotion and I want to be able to direct to a URL that shows all those items. I'm thinking it would be nice if I could automatically set a field on those items to indicate the promotion is valid for them and then filter by that field, that would probably be the best option. Any thoughts on how to do that?
d
I've done it the other way around: I'll have a category -- that can be a published landing page -- and I'll populate it with all eligible items. Then, in my Promotions configuration, I'll create a Promotion that applies a discount by Saved Search. And that Saved Search is essentially just the list of items inside the category (of eligible items). The other way to do it would be a custom field to hold a marker or value that indicate eligibility. And then configure the Promotion with a Saved Search looking for your custom field value. But then you still need to create a landing page. Which in my environment, the easiest landing page is a category. So doing it the first method cuts out some steps.
j
Yeah, it's going to be a long-term promotion that will apply over several product launch cycles, so I'm trying to avoid having to manually manage a landing page because items could easily get left off or forgotten about. But, if I could use the same search as the promotion uses to populate a category, that would be ideal. I could probably script it, but I was hoping there was a better way
d
Ahhh, I see. I don't think of a category as manually managing a page, as I use CSV to import to categories (generally) and the content (at the top of the page) is fairly static. I have something similar for displaying new products or featured products -- but someone wrote a script to make the page display. Above my pay grade, lol. But I suspect that's what you want, if a standard item category isn't attractive.
j
You can kind of do it, but it only supports certain field types and the search results have to be a summary: https://suiterep.com/2021/06/16/populate-a-field-with-a-saved-search/ Not necessarily useful for me, but maybe will spark something someone else can use