Script select parent group by layer

I have complicated workflow in photoshop in which i often use selection of layers by ctrl+click (auto-select is unchecked and selecting layers is chosen) That works good for me. But some time i need quickly select parent group of active layer (only one level up) (it can be achived by using some keyboard shortcut)  I think the only way to do that is PS scripting.
Im new to photoshop scripting but i have a lot of expirience in other languages
As i understand its sould take just couple commands:
1) select parent folder from active object (it can be any type of layer)
2) Collapse this folder (cos it was uncollapsed before)
what syntax shoud i use for this commands? i tried to use help but couldn't find even how to select parent folder of active layer..
Any help?

I've tried the following codes and it works for me. It selects the parent layer of the group and then collapses it:
1. copy the following script and paste it into notepad. Save it as LayerSetSupport.jsx and save it in the same folder as all your other scripts:
//START HERE------------------------------------------
//For code readability
function cTID(s){return charIDToTypeID(s)}
function sTID(s){return stringIDToTypeID(s)}
// =============================
function openAllLayerSets( parent ){
    for(var setIndex=0;setIndex<parent.layerSets.length;setIndex++){
        app.activeDocument.activeLayer = parent.layerSets[setIndex].layers[0];
        openAllLayerSets( parent.layerSets[setIndex]);
function closeAllLayerSets(ref) {
          var layers = ref.layers;
          var len = layers.length;
          for ( var i = 0; i < len; i ++) {
                    var layer = layers[i];
                    if (layer.typename == 'LayerSet') {closeGroup(layer); var layer = layers[i]; closeAllLayerSets(layer);};
function openGroup(layerSet) {
   var m_activeLayer = activeDocument.activeLayer;
   var m_Layer_Dummy01 = layerSet.artLayers.add();
   var m_Layer_Dummy02 = layerSet.artLayers.add();
   layerSet.layers[1].name = layerSet.layers[1].name;
   m_Layer_Dummy01.remove();
   m_Layer_Dummy02.remove();
   activeDocument.activeLayer = m_activeLayer;
function closeGroup(layerSet) {
   var m_Name = layerSet.name;
   var m_Opacity = layerSet.opacity;
   var m_BlendMode = layerSet.blendMode;
   var m_LinkedLayers = layerSet.linkedLayers;
   var m_bHasMask = hasLayerMask();
   if(m_bHasMask) loadSelectionOfMask();
   if(layerSet.layers.length <= 1) {
      addLayer();
      var m_Tmp = activeDocument.activeLayer;
      m_Tmp.name = "dummy - feel free to remove me";
      activeDocument.activeLayer = layerSet;
      ungroup();
      addToSelection("dummy - feel free to remove me");
      groupSelected(m_Name);
   } else {
      activeDocument.activeLayer = layerSet;
      ungroup();
      groupSelected(m_Name);
   var m_Closed = activeDocument.activeLayer;
   m_Closed.opacity = m_Opacity;
   m_Closed.blendMode = m_BlendMode;
   for(x in m_LinkedLayers) {
      if(m_LinkedLayers[x].typename == "LayerSet")
         activeDocument.activeLayer.link(m_LinkedLayers[x]);
   if(m_bHasMask) maskFromSelection();
   return m_Closed;
function ungroup() {
   var m_Dsc01 = new ActionDescriptor();
   var m_Ref01 = new ActionReference();
   m_Ref01.putEnumerated( cTID( "Lyr " ), cTID( "Ordn" ), cTID( "Trgt" ) );
   m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
   try {
      executeAction( sTID( "ungroupLayersEvent" ), m_Dsc01, DialogModes.NO );
   } catch(e) {}
function addLayer() {
   var m_ActiveLayer          =    activeDocument.activeLayer;
   var m_NewLayer             =    activeDocument.artLayers.add();
   m_NewLayer.move(m_ActiveLayer, ElementPlacement.PLACEBEFORE);
   return m_NewLayer;
function hasLayerMask() {
   var m_Ref01 = new ActionReference();
   m_Ref01.putEnumerated( sTID( "layer" ), cTID( "Ordn" ), cTID( "Trgt" ));
   var m_Dsc01= executeActionGet( m_Ref01 );
   return m_Dsc01.hasKey(cTID('Usrs'));
function activateLayerMask() {
   var m_Dsc01 = new ActionDescriptor();
   var m_Ref01 = new ActionReference();
   m_Ref01.putEnumerated( cTID( "Chnl" ), cTID( "Chnl" ), cTID( "Msk " ) );
   m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
   try {
      executeAction( cTID( "slct" ), m_Dsc01, DialogModes.NO );
   } catch(e) {
      var m_TmpAlpha = new TemporaryAlpha();
      maskFromSelection();
      activateLayerMask();
      m_TmpAlpha.consume();
function deleteMask(makeSelection) {
   if(makeSelection) {
      loadSelectionOfMask();
   var m_Dsc01 = new ActionDescriptor();
   var m_Ref01 = new ActionReference();
   m_Ref01.putEnumerated( cTID( "Chnl" ), cTID( "Ordn" ), cTID( "Trgt" ) );
   m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
   try {
      executeAction( cTID( "Dlt " ), m_Dsc01, DialogModes.NO );
   } catch(e) {}
function selectLayerMask() {
   var m_Dsc01 = new ActionDescriptor();
   var m_Ref01 = new ActionReference();
   m_Ref01.putEnumerated(cTID("Chnl"), cTID("Chnl"), cTID("Msk "));
   m_Dsc01.putReference(cTID("null"), m_Ref01);
   m_Dsc01.putBoolean(cTID("MkVs"), false );
   try {
      executeAction(cTID("slct"), m_Dsc01, DialogModes.NO );
   } catch(e) {}
function loadSelectionOfMask() {
   selectLayerMask();
   var m_Dsc01 = new ActionDescriptor();
   var m_Ref01 = new ActionReference();
   m_Ref01.putProperty( cTID( "Chnl" ), cTID( "fsel" ) );
   m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
   var m_Ref02 = new ActionReference();
   m_Ref02.putEnumerated( cTID( "Chnl" ), cTID( "Ordn" ), cTID( "Trgt" ) );
   m_Dsc01.putReference( cTID( "T   " ), m_Ref02 );
   try {
      executeAction( cTID( "setd" ), m_Dsc01, DialogModes.NO );
   } catch(e) {}
function maskFromSelection() {
   if(!hasLayerMask()) {
      var m_Dsc01 = new ActionDescriptor();
      m_Dsc01.putClass( cTID( "Nw  " ), cTID( "Chnl" ) );
      var m_Ref01 = new ActionReference();
      m_Ref01.putEnumerated( cTID( "Chnl" ), cTID( "Chnl" ), cTID( "Msk " ) );
      m_Dsc01.putReference( cTID( "At  " ), m_Ref01 );
      m_Dsc01.putEnumerated( cTID( "Usng" ), cTID( "UsrM" ), cTID( "RvlS" ) );
      try {
         executeAction( cTID( "Mk  " ), m_Dsc01, DialogModes.NO );
      } catch(e) {
         activeDocument.selection.selectAll();
         maskFromSelection();
   } else {
      if(confirm("Delete existing mask?", true, "Warning")) {
         activateLayerMask();
         deleteMask();
function groupSelected(name) {
   var m_Dsc01 = new ActionDescriptor();
   var m_Ref01 = new ActionReference();
   m_Ref01.putClass( sTID( "layerSection" ) );
   m_Dsc01.putReference(  cTID( "null" ), m_Ref01 );
   var m_Ref02 = new ActionReference();
   m_Ref02.putEnumerated( cTID( "Lyr " ), cTID( "Ordn" ), cTID( "Trgt" ) );
   m_Dsc01.putReference( cTID( "From" ), m_Ref02 );
   var m_Dsc02 = new ActionDescriptor();
   m_Dsc02.putString( cTID( "Nm  " ), name);
   m_Dsc01.putObject( cTID( "Usng" ), sTID( "layerSection" ), m_Dsc02 );
   executeAction( cTID( "Mk  " ), m_Dsc01, DialogModes.NO );
   return activeDocument.activeLayer;
function addToSelection(layerName) {
   var m_Dsc01 = new ActionDescriptor();
   var m_Ref01 = new ActionReference();
   m_Ref01.putName( cTID( "Lyr " ), layerName );
   m_Dsc01.putReference( cTID( "null" ), m_Ref01 );
   m_Dsc01.putEnumerated( sTID( "selectionModifier" ), sTID( "selectionModifierType" ), sTID( "addToSelection" ) );
   m_Dsc01.putBoolean( cTID( "MkVs" ), false );
   try {
      executeAction( cTID( "slct" ), m_Dsc01, DialogModes.NO );
   } catch(e) {}
function TemporaryAlpha() {
   activeDocument.selection.store((this.alpha = activeDocument.channels.add()));
   activeDocument.selection.deselect();
   this.consume = function() {
      activeDocument.selection.load(this.alpha);
      this.alpha.remove();
// The main function
//openGroup(activeDocument.activeLayer);
//openAllLayerSets( app.activeDocument );
//closeGroup(activeDocument.activeLayer);
//closeAllLayerSets( app.activeDocument );
//END HERE-----------------------------------------------
then, copy the following code and save it into the same folder, and save it under any filename you wish:
//START HERE-----------------------------------------------
var doc = app.activeDocument;
var theLayer = activeDocument.activeLayer;
var theParent = theLayer.parent;
doc.activeLayer = theParent;
// =======================================================
// The main function
//@include "LayerSetSupport.jsx"
if (activeDocument.activeLayer.typename == 'LayerSet')
{app.activeDocument.suspendHistory('closeGroup','closeGroup
(activeDocument.activeLayer)');}
//END HERE-----------------------------------------------
now once you run the above script (the one which you gave it your own filename), it should select the parent layer and then collpase it. First make sure that the selected(active) layer is not the parent layer of the group. I beleive the main scripting here was done by csuebele, so thank him for this
(sorry I don't know how to paste the above code into its own sub-window)

Similar Messages

  • Copy Group or Layer to *Below* the Selected layer

    Hey everyone,
    So I have a bit of a workflow problem. It's not a huge deal but it's one of those things that really adds up over time. Whenever I'm designing mock ups for a page I usually work from the top down. In cases of let's say laying out items in a blog roll, I will
    - Set up all the elements for the post (Title, author, date, body etc...)
    - Group them together
    - Select the group
    - Hold down Cmd/Ctrl + Option/Alt + Shift and drag down to make a duplicate group
    My problem is that the new group (or layer) appears *above* the original one, so now I have to go back into my layers panel and move Post 2 below Post 1 so the structural hiearchy of my Groups/Layers reflect (for the most part) the visual hiearchy of my design.
    Are there any keyboard shortcuts, or checkboxes I can tick to have duplicate items appear below the original in terms of layer hiearchy?
    Any help would be much appreciate!

    I don't know of anyway to have a group created below another group.  I know that if you ctrl/cmd-click to create a new layer, it will be created below the current layer.  My only suggestion is to use ctrl/cmd-[ to move the group down - just be sure the group is collapsed, otherwise your new group would go into the group below.

  • Layer selection in groups

    Hello.
    I wanted to ask:
    is there shortcut or special key combination to select layer on canvas when it's in group?
    When I press ctrl + lmb on layer that is on canvas PS selects whole group but not that layer.

    Hi Oxmstr,
    There is a shortcut for selecting layers that are inside of a group.
    If you have a mouse with more than one button, select the Move Tool and right-click on the image area that is on the layer you want to select. If you are using a Mac and a one-button mouse, select the Move Tool and Ctrl-click. A popup menu will appear and you can select the layer you want very quickly.
    To find more shortcuts for Photoshop CS6, check out  the Photoshop CS6 Quick Reference Guide. You can search for tools, menus, and shortcuts.
    I hope this helps,
    Luanne

  • How to calculate actual selection or group width and height with clipping

    If a group has clipping paths then the height and visible bounds will include the dimensions of all paths selected including the clipped or hidden paths.
    However, the width and height shown on the width and height of the AI detail boxes for the selection shows just the visible dimensions.
    I want to retrieve the same values that is shown on the screen when a group is selected.
    It is somewhat counterintuitive that the "visiblebounds" property does not show just what is visible.
    I'm scaling the visible content of a selection to fit within another path but I need to be able to calculate the dimensions of the only what is visible after clipping.
    What do you have to do with scripting to get these values? Go through all of the path items in a group recursively and save the min and max values of any visiblebounds for clipping paths? Any better alternatives that I don't see?
    Thanks for any help!

    I ended up using the visible bounds for both scale and position as I also discovered that attempting to position a group with the position method would also result in missing the mark. The top and left (x,y) bounds I calculated without the clipped dimensions needed to be used to offset the actual position where I wanted the visible paths to be displayed.
    The functions I used ended up looking like so:
    function GetPoints(dblInch)
         var dpi = 72;
         return dblInch * dpi;
    function getRealVisibleBounds(grp) {
         var outerBounds = [];
         for(var i = grp.pageItems.length - 1; i >= 0;i--)  {
              var bounds = [];
              if(grp.pageItems[i].typename == 'GroupItem') {
                   bounds =  getRealVisibleBounds(grp.pageItems[i]);
              else if((grp.pageItems[i].typename == 'PathItem' || grp.pageItems[i].typename == 'CompoundPathItem')
                   && (grp.pageItems[i].clipping || !grp.clipped)) {
                   bounds = grp.pageItems[i].visibleBounds;
              if (bounds.length > 0) {
                   outerBounds = maxBounds(outerBounds,bounds);
         return (outerBounds.length == 0) ? null : outerBounds;
    function positionVisible(grp,x,y)
         var bounds = getRealVisibleBounds(grp);
         var newX = GetPoints(x) + (grp.left - bounds[0]);
         var newY = GetPoints(y) + (grp.top - bounds[1]);
         grp.position = [newX,newY];
    function maxBounds(ary1,ary2) {
         var res = [];
         if(ary1.length == 0)
              res = ary2;
         else if(ary2.length == 0)
              res = ary1;
         else {
              res[0] = Math.min(ary1[0],ary2[0]);
              res[1] = Math.max(ary1[1],ary2[1]);
              res[2] = Math.max(ary1[2],ary2[2]);
              res[3] = Math.min(ary1[3],ary2[3]);
         return res;
    and were called like so:
    var doc = app.activeDocument;
    if (doc.selection.length > 0) {
         var grpOriginal = null;
         if(doc.selection.length == 1 && doc.selection[0].typename == 'GroupItem') {
              grpOriginal = doc.selection[0];
         else {
              grpOriginal = doc.groupItems.add();
         doc.selection = null;
         if(grpOriginal.layer.name != 'approval') {
              grpOriginal.move(doc.layers['approval'],ElementPlacement.PLACEATEND);
         var artBounds = getRealVisibleBounds (grpOriginal);
         var artWidth = artBounds[2] - artBounds[0];
         var artHeight = artBounds[1] - artBounds[3];
         var imprintHeight = GetPoints(0.625);       // 0.625 is new height, hardcoded for demonstration
         var imprintRatio = imprintHeight / artHeight;
         var section = doc.layers['sectionLeft'];    // section where I placed the art
         var grpArt = grpOriginal.duplicate(section,ElementPlacement.PLACEATEND);
         grpArt.resize(100.0 * imprintRatio,100.0 * imprintRatio);
         grpArt.move(section,ElementPlacement.PLACEATBEGINNING);
         grpArt.selected = true;
         positionVisible(grpArt,0.0,16.75);          // x & y hardcoded for demonstration
    else {
         alert('artwork needs to be selected');
    I'm new at this so are there any better options to do these things?

  • Error while getting the Direct parent group from IUser

    Dear all,
    I'm using KM API's to upload documents to KM through a Webdynpro Application.
    The uploading of the document is working correctly.  the permission setting to the newly uploaded document is done based on user group in which the user is a member.
    This is also working.
    While uploading, the  user gets a selection screen to choose the area.
    If the user is a member of All India that person will get option to select all branches and all areas under each branch.
    If the user is a member of any one branch, he can select only areas coming under his branch.
    Here the problem starts. (All India is the parent group for all branches,  under branch some areas are there.)
    User 1 is a member of All India
    User 2 is a member of Branch1
    If an All India user comes in we give the branch list in a dropdown list. Branch user should not get this dropdown. He's not supposed to upload documents for any other branch.
    I am checking the parent group of the user identify his Level. But even if the user is not a member of All India, I'm getting the dropdown to choose the branch.
    Please give me your valuable guidance to solve this.
    My code for getting the parent group is given below.
    public com.sapportals.portal.security.usermanagement.IGroup getParentGroup( com.sapportals.portal.security.usermanagement.IUser ep5User )
        //@@begin getParentGroup()
            String [] parentGrp=null;
            IGroup parentGroup=null;
            try
                 IGroupFactory groupFact=WPUMFactory.getGroupFactory();
                 /* Get all the User groups in which the user is a member */
                 String [] userGroup=ep5User.getDirectParentGroups();
                 for(int i=0;i<userGroup.length;i++)
                      IGroup userGrp=groupFact.getGroup(userGroup<i>);
                      if(userGrp.getId().startsWith("B00") || userGrp.getId().equalsIgnoreCase("ALL_INDIA"))
                           msgMngr.reportSuccess("ID of the group "+userGrp.getId());
                           parentGroup=userGrp;
                           break;     
            catch(UserManagementException e){
                 msgMngr.reportException("UserManagementException"+e,false);
            return parentGroup;
        //@@end
    Best Regards,
    Aparnna

    I found a solution. Not sure if its the correct one.
    Used the com.sap.security.api.IUser and used the below code to check if the user is a member in group
    IUser user=WDClientUser.getCurrentUser().getSAPUser();
                   com.sap.security.api.IGroup grp=UMFactory.getGroupFactory().getGroupByUniqueName("ALL_INDIA");
                   if(grp.isGroupMember(user.getUniqueID(),false))
    //code to be executed if the user is a member
    Best Regards
    Aparnna

  • Script - Paste a Group into a TextFrame

    Very similar to my last question here - http://forums.adobe.com/message/4167532
    In Indesign desktop I can copy and paste a group inside a text frame - obviously this can't be done in Indesign server.
    I have tried looking at the duplicate and move methods - but these don't take a page item as the 'to' parameter.
    var textFrame = myPage.pageItems.item("TextFrame");
    var group1 = myPage.pageItems.item("group1");
    var group2 = myPage.pageItems.item("group1");
    I can remove items once they are already in the text frame with
    textFrame.pageItems.item(0).remove();
    PageItems is read only - so I can't add items to it.
    Suggestions?

    Alas -- the following did not work, although it does with another kind of item (try with "rectangles.add", that works). It may give you some fresh ideas, so I'm showing it anyway:
    textFrame = app.selection[0].parentTextFrames[0];
    group1 = app.layoutWindows[0].activePage.parent.groups[0];
    group1elements = group1.ungroup();
    textFrame.insertionPoints[1].groups.add(group1elements); <-- fail!
    You can test this in the UI version with (1) some group, and (2) a text frame with the text cursor inside it.
    The "fail" line errors out with
    JavaScript Error!
    Error Number: 24
    Error String: textFrame.insertionPoints[1].groups.add is not a function
    File: zzztry.js
    Line: 5
    Source: textFrame.insertionPoints[1].groups.add(group1elements);
    which is kind of a bummer.

  • Script populate parent-child hierarchy not running

    Hallo guys
    I have problem when running script populate Parent-Child Relationship Table.
    Here is the script.I don't even change the script.just run it in PL/SQL
    declare
    v_max_depth integer;
    v_stmt varchar2(32000);
    i integer;
    begin
    select max(level) into v_max_depth
    from V_D_BRANCH
    connect by prior BRANCH_KEY=PARENT_BRANCH_KEY
    start with PARENT_BRANCH_KEY is null;
    v_stmt := 'insert into DM_ANALYTICS.BRANCH_HIERARCHY (MEMBER_KEY, ANCESTOR_KEY, DISTANCE, IS_LEAF)
                select BRANCH_KEY as member_key, null, null, 0 from V_D_BRANCH where PARENT_BRANCH_KEY is null
                union all
                select  member_key,
                replace(replace(ancestor_key,''\p'', ''|''), ''\'', ''\'') as ancestor_key,
                case when depth is null then 0
                else max(depth) over (partition by member_key) - depth + 1
                end as distance, is_leaf
    from
    select member_key,depth,
    case     when depth is null then '' || member_key
    when instr(hier_path, ''|'', 1, depth + 1) = 0 then null
       else substr(hier_path, instr(hier_path, ''|'', 1, depth) + 1, instr(hier_path, ''|'', 1, depth + 1) - instr(hier_path, ''|'', 1, depth) - 1)
    end ancestor_key,
    is_leaf
    from
        (    select BRANCH_KEY as member_key, PARENT_BRANCH_KEY as ancestor_key, sys_connect_by_path(replace(replace(BRANCH_KEY, ''\'', ''\''), ''|'', ''\p''), ''|'') as hier_path,
          case when BRANCH_KEY in (select PARENT_BRANCH_KEY from V_D_BRANCH ) then 0 else 1 end as IS_LEAF
    from V_D_BRANCH 
    connect by prior BRANCH_KEY = PARENT_BRANCH_KEY
    start with PARENT_BRANCH_KEY is null
      ( select null as depth from dual;
    for i in 1..v_max_depth - 1 loop
    v_stmt := v_stmt || union all select '' || i || '' from dual;
    end loop;
    v_stmt := v_stmt || ) )
    where ancestor_key is not null;
    execute immediate v_stmt;
    end;
    but I got errors like following:
    Error report -
    ORA-06550: line 19, column 12:
    PLS-00103: Encountered the symbol "insert into DM_ANALYTICS.BRANCH_HIERARCHY (MEMBER_KEY, ANCESTOR_" when expecting one of the following:
       ( - + case mod new not null <an identifier>
       <a double-quoted delimited-identifier> <a bind variable>
       continue avg count current exists max min prior sql stddev
       sum variance execute forall merge time timestamp interval
       date <a string literal with character set specification>
       <a number> <a single-quoted SQL string> pipe
       <an alternatively-quoted string
    06550. 00000 -  "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    what should I do guys?any idea,any solution would be appreciated.thanks alot guys

    956850 wrote:
    hi,
    i tried making "Dimension with Parent-Child Hierarchy" as described in your tutorials.
    i finished with the admin tool and database changes and with no errors.
    when trying to create a new answer, by only puting the hierarchy column in the answer.
    the result show "no result" exist.
    i am not sure what i am doing wrong. maybe you can point me to the problem?
    thanks
    Mirit.Hi Mirit,
    What is the table that you created hierarchy on?
    Which column in the hierarchy you pulled into your reports to see the No Result message?
    Please query the table and see if has data.
    Thanks,
    G. SK

  • Analytical Services failed to get user's parent group tree with Error

    Hi,
    We have a frequent errror during our weekly batch for an application.
    The context:
    - Essbase Administration Services we are using is version is 9.3.1.
    - 8 applications are calculated during the week-end. The scripts executed are exactly the same for the 8 applications.
    - For example let's say that 5 scripts are launched during the night in the batch for each application (script 1, script 2 ... script 5)
    - App1 and App2 are launched alone and before the 6 others applications as these applications database are 3 x bigger (App1 is calculated alone, then app2 is calculated alone, then app3 to app8 scripts are launched in the same time).
    The issue :
    - We don't see any issue for app3 to app8, the calculation are executed without any problem from script1 to script5.
    - But we have an error in App1 and App2 log when the bath execute script 4 and we see the following error in the server log **
    "Analytical Services failed to get user's parent group tree with Error".
    (** : we don't see any log for script 4 in the application log - it's like the server bypass script 4 to go directly from script 3 to script 5 )
    Nothing special is done in script 4 but just an aggregation of the Year dimension (using a @SUM(@RELATIVE(Year,0)) calculation.
    I think that there is may be a synchronization error with Shared Services but what is strange is that it's always for the same script 4 and the batch is launched at different time every week-end.
    Can the issue be linked to the size of the database of applications (8 Gb) and difficulties for the processor to executes aggregation in a large database volume ?

    Hi,
    According to your description, my understanding is that the error occurred when sending an email to the user in workflow.
    Did you delete the existing Connections before setting NetBiosDomainNamesEnabled?
    If not, I recommend to delete and recreate your AD connections, then set NetBiosDomainNamesEnabled to true.
    Or you can delete the original User Profile Service Application and create a new one, then set the NetBiosDomainNamesEnabled to true and start the User Profile Service Application
     synchronization.
    More reference:
    http://social.technet.microsoft.com/wiki/contents/articles/18060.sharepoint-20xx-what-if-the-domain-netbios-name-is-different-than-the-fqdn-of-the-domain-with-user-profile.aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Problem in repetetion of the value of parent group element in each PDFpage

    I am using data template in BI PUB. I have table containing Region_Name , Sales_Rep_Name and amount. I need to show the region_name(parent group element) on the top(not in header) of the next and subsequent pages . under same region_name if sales_rep_name(child group element) is large enough not to fit in a single page, then same region_name should appear in the next page. But this name is not repeting in every page of the generated PDF.
    QUERY: SELECT region_name,sales_rep_name,SUM(amount) amount FROM edwods_bipub_test
    GROUP BY region_name,sales_rep_name
    ORDER BY region_name,sales_rep_name
    Data Structure for the above query: <dataStructure>
              <group name="g_region" dataType="varchar2" source="Q_weekly_summary_by_salesrep">
                   <element name="region_name" dataType="varchar2" value="REGION_NAME"/>
                   <group name="g_sales_rep" dataType="varchar2" source="Q_weekly_summary_by_salesrep">
                        <element name="sales_rep_name" dataType="varchar2" value="sales_rep_name"/>
                        <element name="amount" dataType="number" value="amount"/>
                   </group>
              </group>
         </dataStructure>
    Please help me at [email protected]

    create a formula column
    function Cf_clientaddressformula
    return varchar
    is
    clientaddress VarChar2(1000);
    begin
    Select DeCode(:Address1, Null, Null, :Address1)||
    DeCode(:AddressN, Null, Null, Chr(10)||:AddressN)||
    DeCode(:City, Null, Null, Chr(10)||:City)||
    DeCode(:State, Null, Null, Chr(10)||:State)
    DeCode(:Country, Null, Null, Chr(10)||:Country)
    DeCode(:PostalCode, Null, Null, Chr(10)||:PostalCode)
    Into ClientAddress
    From Dual;
    ClientAddress := LTrim(RTrim(ClientAddress,Chr(10)),Chr(10));
    return(ClientAddress);
    End;
    assign this cf to the address field in your report and set that field "Vertical Elasticity" to "Variable"
    Hope this will solve your problem.
    Sumanth

  • Numbering table with parent grouping

    Hi, i have a table that i grouped by email in ssrs, and i would like to insert a row number, that will be by the parent grouping
    i tried using a solution from another question.
    ;with cte as
    (select *,dense_rank() over(order by row1) as rowID
    from @table
    select * from cte
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/078e45e5-edbf-4451-a5d2-bcf2f0382353/how-to-make-a-grouped-row-number?forum=transactsql
    but i was not able to get it working. this was the query i used to prepare the table
    SELECT        FirstName, LastName, EmailAddress, tused, CourseTitle, lastlogindate, Noofmodules, COUNT(coursecompleted) AS modulesstarted, 
                             REPLACE(REPLACE(REPLACE('<' + STUFF
                                 ((SELECT        ',' + CAST(CourseModule AS varchar(20)) AS Expr1
                                     FROM            edsf1
                                     WHERE        (FirstName = e.FirstName) AND (LastName = e.LastName) AND (coursecompleted = '1') AND (CourseTitle = e.CourseTitle)
    FOR XML PATH('')), 1, 1, ''), 
                             '<Expr1>', ''), '</Expr1>', ''), ',', '') AS CoursesCompleted
    FROM            edsf1 AS e
    WHERE        (coursecompleted = '1') OR
                             (coursecompleted = '0')
    GROUP BY FirstName, LastName, EmailAddress, CourseTitle, lastlogindate, Noofmodules, tused

    Sorry 
    not fully clear
    sounds like this
    SELECT DENSE_RANK() OVER (ORDER BY EmailAddress),
    FirstName, LastName, EmailAddress, tused, CourseTitle, lastlogindate, Noofmodules, COUNT(coursecompleted) AS modulesstarted,
    REPLACE(REPLACE(REPLACE('<' + STUFF
    ((SELECT ',' + CAST(CourseModule AS varchar(20)) AS Expr1
    FROM edsf1
    WHERE (FirstName = e.FirstName) AND (LastName = e.LastName) AND (coursecompleted = '1') AND (CourseTitle = e.CourseTitle) FOR XML PATH('')), 1, 1, ''),
    '<Expr1>', ''), '</Expr1>', ''), ',', '') AS CoursesCompleted
    FROM edsf1 AS e
    WHERE (coursecompleted = '1') OR
    (coursecompleted = '0')
    GROUP BY FirstName, LastName, EmailAddress, CourseTitle, lastlogindate, Noofmodules, tused
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page
    it works in sql server when i run the query, it assigns the row number to the right person. but when i try to use it in ssrs query, i get 
    The OVER SQL construct or statement is not supported.
    Make it into proc like this
    CREATE PROC ProcName
    AS
    SELECT DENSE_RANK() OVER (ORDER BY EmailAddress),
    FirstName, LastName, EmailAddress, tused, CourseTitle, lastlogindate, Noofmodules, COUNT(coursecompleted) AS modulesstarted,
    REPLACE(REPLACE(REPLACE('<' + STUFF
    ((SELECT ',' + CAST(CourseModule AS varchar(20)) AS Expr1
    FROM edsf1
    WHERE (FirstName = e.FirstName) AND (LastName = e.LastName) AND (coursecompleted = '1') AND (CourseTitle = e.CourseTitle) FOR XML PATH('')), 1, 1, ''),
    '<Expr1>', ''), '</Expr1>', ''), ',', '') AS CoursesCompleted
    FROM edsf1 AS e
    WHERE (coursecompleted = '1') OR
    (coursecompleted = '0')
    GROUP BY FirstName, LastName, EmailAddress, CourseTitle, lastlogindate, Noofmodules, tused
    Then in SSRS use below as command
    EXEC ProcName
    and it will work fine
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Changing from "Pass Through" as Default in Blend Mode in a Group Folder Layer Set

    Hello Forum gurus!
    Using a MacBook Pro, 10.5.4. Painting with CS2. My question is two-fold.
    When the Group layer folder in a layer set is selected, it is displaying the "Pass Through" blend mode by default. Is there a special convenience to this? (Best use for pass through blend mode)
    Also, How may I change the default in this mode to be "Normal" as the setting when creating a Group folder layer set?
    Thanks!!
    Colene

    Matthias, now I understand. We're both right from different perspectives. If you want the adjustment layer (should there be one within the group) to affect all layers below the group (perhaps because that's the way the image looked before you made the group in the first place), then Pass Through is your blend mode. If you want that adjustment layer to affect only those layers within the group (which I often do), then Normal (or some other) is your blend mode.

  • Selecting a group of files and putting them in a newly created folder?

    If I select a group of files in finder or on my desktop -- is there a command to create a new folder and put them in it? (I'm thinking of how you can take a selection in iTUNES and create a playlist from the selection).
    (I know how to create a folder and then drag my selection into it).
    Thanks!

    Open the Script Editor in the /Applications/AppleScript/ folder and paste in the following:
    tell application "Finder"
    make new folder at desktop
    move (selection as alias list) to the result
    end tell
    This script expects that two or more items are selected. You can enable the script menu in the AppleScript Utility and then add the script to the menu for easy access.
    (17890)

  • Scripts: Select an object with a note, duplicating and applying swatch

    I am trying to write a Javascript that can do the following:
    1) Select an object whose note has <Object Name> (so its layers is also selected)
    2) Duplicate the layer of that object
    3) Rename the new layer to <Layer Name>
    4) Apply a swatch to the object on the new layer (the object is only single colour)
    5) Apply a new note to the object (over-writing the original note).
    I also want to write a separate script that can do the following:
    1) Select an Object whose note has <Object Name> (so its layer is selected as well)
    2) Hide all other layers
    3) Save a copy of the document with a specific name
    I can do this as an Illustrator action. However, I need several different copies of the scripts where the Object Name, Layer Name, Swatch and File Name changes.
    Re-recording the action to change the names is cumbersome.
    I have looked at the Illustrator scripting reference, but cannot see any commands for select objects by their notes.
    I was wondering if someone could give me some pointers on how to proceed (Or possibly, if feeling very generous, could write the script for me )

    That's my error changing variables before posting… I can't edit that post now but this should fix it… Plus give you a very basic UI to enter a value…
    #target illustrator
    var n = prompt( 'Please enter your \'Note\' string…', 'muppet', 'Note finder' );
    findNote( n );
    function findNote( n ) {
              var doc = app.activeDocument;
              var allMyArt = doc.pageItems;
              var toSelect = Array();
              for ( var i = 0; i < allMyArt.length; i++ ) {
                        if ( allMyArt[i].note == n ) { toSelect.push( allMyArt[i] ) };
              doc.selection = toSelect;
    Oh I didn't mean b4 n after running a duff script… What you do with actions so I can see what objects are duplicated where then coloured…

  • Summarize (sum) a field in a child group to a parent group section

    Can someone tell me how to insert a summary (sum) of a field in a child group to a parent group?  The column is not in the detail row, only a group section.

    Hi Mark,
    As I understand from the description, you have 2 groups(child and parent) and you want to insert summary of the field in child group to a parent group.
    Try  following........
    Go to Insert -> summary
    Insert summary based on required field and then under the option "Summary Location" select the Parent Group.
    Please let us know if you are looking for something else.
    Regards
    Ankeet

  • Hide parent group if child groups are hidden

    I have SSRS 2005 report.
    Report structure - To show a particular account transactions for every company.
    So user will select account then i have to show all transactions for that account for all companies.
    Parent group - Account
    Child group - Company
    Details section is like below,
    transactions id            transaction type          debit
              credit              difference
    In the groups visibility for compnay group (chile group) i have set condition if diff is zero then hide
    so its hiding child groups. but showing account i.e. parent group. 
    My Report looks like,
    Account : Acc001 (Parent group)
    Company - ABC     (child group)
    transactions id            transaction type          debit  
            credit          
    difference    
    t1                                   type 1                        4
    t2                                   type 2                                    
            4
    total by company            4                    4                   0
    Company - XYZ            (child group)
    transactions id            transaction type          debit  
            credit           difference    
    t3                                   type 1                        100
    t4                                   type 2                                    
             100
                                       total by company           100               100      
             0
    total by account              104             104                 0       
    so i am hiding companies ABC and XYZ but report still show last row total by account. so if abc and xyz are hidden i want to hide that account group (for e.g. Acc001).
    h2007

    Hi h2007,
    According to your description, you have a report with detail rows showing transaction information, child group showing companies, and parent group showing account. Now you want to hide the detail row if the difference(debit-credit)=0, and if the detail row
    is hidden, you want to hide the company as well. Right?
    In Reporting Service, we can’t use a property of a text box as an expression when we use IIF() function to evaluate. But we can put this whole IIF() expression into a IIF() function for another textbox or group to set visibility. We tested your case in our
    local environment. It works fine and completely achieve your goal. Here are steps and screenshots for your reference:
    Create a table as described.
    Right click on any textbox of detail row. Select Properties.
    Click on Visibility tab, put this text into expression:
    =IIF(SUM(Fields!Debit.Value)-SUM(Fields!Credit.Value)=0,true,false)
    Select toggled by its parent group (Company).
    Repeat step2 and step3 for each textbox of detail row.
    Right click on textbox of Company. Select Properties.
    Click on Visibility tab, put this text into expression:
    =IIF(IIF(SUM(Fields!Debit.Value)-SUM(Fields!Credit.Value)=0,true,false),true,false)
    Select toggled by its parent group (Account).
    Right click on textbox of Account. Select Properties.
    Click on Visibility tab, put this text into expression:
    =IIF(IIF(SUM(Fields!Debit.Value)-SUM(Fields!Credit.Value)=0,true,false),true,false)
    Go to Properties window, set InitialToggleState Expanded for Company and Account textbox
    Save and preview.
    Reference:
    Expression Examples (Report Builder and SSRS)(See Properties->Visibility)
    Expression driven visibility in a report
    Best Regards,
    Simon Hou

Maybe you are looking for