Quintiq file version 2.0
#parent: #root
Method SetDefaultValues (
  Bookmark bookmark
) id:Method_DialogCreateEditBookmark_SetDefaultValues
{
  #keys: '[132444.0.71820935]'
  Body:
  [*
    // If create new on a bookmark, try to get its parent as the default parent; if create new on a folder, 
    // it will default to be the parent
    if ( isnull( bookmark ) )
    {
      bookmark := select( ScenarioManager, Bookmark, b, b.IsFolder() and isnull( b.Parent() ));
    }
    
    defaultparent := guard( ifexpr( bookmark.IsFolder(), bookmark.Name(), bookmark.ParentName() ), "" );
    SelectionParent.Text( defaultparent );
  *]
}
