View Single Post
Old 05-26-2025, 06:33 PM   #1500
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,205
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
Additionally, instead of two separate SFEs with _variant_argument as a conditional, can _variant_argument be used in a SFE (templated)?

EDIT: It does. I set to null for one variant, and current date for another.
That is actually one of the main reasons I did the chain variations. I have some chains the perform operations and then rate a book. So I wanted to have a submenu for these chains, with variations that look like this:

Code:
Do something and rate: ★
Do something and rate: ★★
Do something and rate: ★★★
Do something and rate: ★★★★
Do something and rate: ★★★★★

The template for the chain variations is like this:
Code:
program:
    text = 'Do something and rate: ';
    for rating in range(2,11,2):
        text = text & '★';
        add_chain_variant(text, rating, 'submenu name')
    rof

Now, you can use single field edit to set the rating based on the _variant_argument:
Code:
program:
    globals(_variant_argument)

Last edited by capink; 05-26-2025 at 06:40 PM.
capink is offline   Reply With Quote