tableau icon indicating copy to clipboard operation
tableau copied to clipboard

union: support union custom variable name

Open wenchy opened this issue 1 year ago • 2 comments

Refer https://tableauio.github.io/docs/excel/struct/#custom-named-struct

wenchy avatar Aug 20 '24 02:08 wenchy

This does not make sense for now. Unions are all predefined structs, and the field name of predefined struct is not decided by its custom name. We just trim the suffix of its first field and use the rest part as it's field name.

Image Image

Kybxd avatar Apr 29 '25 02:04 Kybxd

Mabye you misunderstand the problem.

Problem: For horizontal two union fields of same union type, how to resolve it? Solution: Just like https://tableauio.github.io/docs/excel/struct/#custom-named-struct, if custom name explicitly set, then the struct name prefix should be changed to the custom variable name but not the struct (or union) type name.

wenchy avatar May 06 '25 08:05 wenchy