Skip to main content

Search

Automatically set all available options from a lookup field

Answered

Comments

2 comments

  • Official comment
    skybow Support

    Dear DieterJauslin,

    this is much easier for a multi lookup field. You can simply use our initial value expression on the newform and you have to set it as an array of item IDs.

    To get them you can use our QueryList function as Assignment Expression as follows:

    [[@Web.QueryList([[@Web.ServerRelativeUrl]]+'/Lists/yourSubList', 'CAMLQueryToGetTheItemsFromTheSublist', 0, 'ID', 'Scope=Recursive')]].map(x => x.ID)
     
    Kind regards
    skybow Support
  • DieterJauslin

    AMAZING! ;)

    Works as expected!

    Thank you so much! 
    Best wishes

    Dieter

    0

Please sign in to leave a comment.