cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Select multiple elements to delete

bfriesen
17-Peridot

Select multiple elements to delete

Hello, I have a table that that has a column of indexterm elements that I would like to delete. How can I select all of the indexterm elements and delete them?

 

Bryon 

2 REPLIES 2
bfriesen
17-Peridot
(To:bfriesen)

Tried this and it seems to work, only it does not delete anything within the tags.

 

Bryon

 

function remove_indexterm_tags()
{
local oid = oid_first_tag()
local cnt
local i = 1

cnt = oid_find_children(oid, $arr, "indexterm")
for ($i=1; $i<=$cnt; $i+=1)
{
if (oid_name(oid_parent($arr[$i])) == "entry")
{
goto_oid($arr[$i],-1)
dt
}
}
}
map F1 remove_indexterm_tags();

Instead of goto_oid() and dt, try using this instead:

oid_delete($arr[$i]);
Announcements

Top Tags