Skip to content

Dynamic pos with indexof() help #814

@Yet-another-NPC-guy

Description

@Yet-another-NPC-guy

I'm trying to place "Open with" right below "Open" if "Open" exists, or at position 0 ("top") if "Open" doesn't exist, but I can't get it to work.

None of these worked:
modify(where=this.name=="Open with" pos=(indexof("Open", 0) + 1))
modify(where=this.name=="Open with" pos=indexof("Open") < 0 ? 0 : indexof("Open", 1))
modify(where=this.name=="Open with" pos=if(indexof("Open") >= 0, indexof("Open", 1), 0))

Can anyone help me make this work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions