Forum Discussion

coffee's avatar
coffee
Contributor
8 years ago

Name Mapping - Map Child Objects - Selecting Properties

Hi,

 

I have mapped a parent object in name mapping, then I right click that parent --- choose Map Child Objects 

 

That parent has 50 children. I don't want to manually map it, so I tick that option Automatically map children (or something like that) and TC will map all children. 

 

The problem with automatically map children is that TC doesn't select the properties that I need.  TC just selected ObjectType property meanwhile I would like to have innerHTML , innerText , etc properties.  

 

How can I tell TC to automatically map all those 50 children and select all those properties that I want ?  

Manually map it and choose the property for each child would take a lot of time. 

 

Secondly, if I don't select innerText property in NameMapping , in my JS script can I write like this? 

 

 var props = ["innerText"];
  var values = [Test2];
  var depth = 0;
  var day = parent.FindChild(props, values, depth);

 

Thank You.

2 Replies

  • You can use any valid properties (and their expected values of course) when using FindChild, FindAllChildren, etc. They don't have to bear any relation to what you used to map it.

     

    I'll leave the automatic mapping question to someone else. I never use it and pretty much accept I need to manually control the mapping properties for anything I use in the object map if I want it to remain reliable.