yet another alternative: if the long id of <your control> ends with the long id of <your group> then …
this catches controls whose ownership includes intervening grouping between your control and your group — Dick > On Aug 23, 2024, at 5:48 AM, Brian Milby via use-livecode > <[email protected]> wrote: > > Another alternative. > > If the short id of fld "xyz" is among the lines of the childcontrolids of > group "abc" then … > > This one should work as long as there is only one field with that name on the > card (tried from message box). > > Brian Milby > [email protected] > >> On Aug 23, 2024, at 8:05 AM, Paul Dupuis via use-livecode >> <[email protected]> wrote: >> >> On 8/23/2024 7:45 AM, Klaus major-k via use-livecode wrote: >>> Hi jbv, >>> >>>>> Am 23.08.2024 um 13:27 schrieb jbv via use-livecode >>>>> <[email protected]>: >>>> >>>> Hi list, >>>> >>>> Is there a quick way to check if a group contains a specific control, >>>> something like : >>>> if there is a fld "xyz" in grp "abc" of this cd >>>> I tried many things but it always generates an error. >>>> So far, the only way I can think of is to maintain a custom prop >>>> for each group, featuring a string that is the list of all controls >>>> names of the group. >>> if you don't have any other controls with the same name, >>> you could check: >>> -> lineoffset("xyz",the childcontrolnames of grp "abc") >>> >> >> or, if you prefer: >> >> if "xyz" is among the lines of the childcontrolnames of group "abc" then >> >> NOTE: As mentioned, "xyz" would need to be a unique name for control in the >> group. If you have a field "xyz" and a button "xyz" (or 2 buttons or 2 or >> more fields with the same name, etc.) this is not accurate. >> >> >> _______________________________________________ >> use-livecode mailing list >> [email protected] >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
