Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
extended attrib for replicant
Bhargav Coca
I am on TS6.5 on win2k. I am trying to set extended attrib to a replicant textarea, is this doable? I guess it is, but i am loosing it somwhere. Can anyone give me a suggestion. Here is a very small snippet on how i am setting, I am using the oFile procedure and then setting attribuetes on each and every item.
my $setCurrentProjects = "$IWExtAttr -s \"Current Projects\"=\"".iwpt_dcr_value('tst.Details.Detail.Current Projects') ."\" $OFile";
system($setCurrentProjects);
please suggest.
Thank You
Find more posts tagged with
Comments
jbonifaci
Extended Attributes can only be set on the DCR, not on individual items within the DCR. What are you trying to accomplish?
~Jeff
Bhargav Coca
Yes sir, Say for example we have a DCR with items like Name, Address, Phone, and Description. We can set any item as extended attribute. But in my scenario Description is a relicant. I want to set this description field as extended attribute. can i do it?
Thank you
jbonifaci
Sure, you can any kind of extended attribute on a file. As long as you can retrieve the value, you can set it.
If you are doing it for replicants though, you would likely want to include the replicant instance. For example:
iwextattr -s "/ReplicantName/ItemName/1"="ItemValue1" <dcrPath>
iwextattr -s "/ReplicantName/ItemName/2"="ItemValue2" <dcrPath>
iwextattr -s "/ReplicantName/ItemName/3"="ItemValue3" <dcrPath>
etc.
~Jeff
Bhargav Coca
You are right again, I am using an "AND" compination for my replicants. So that wouldn't be needed, see my files with this post attached.
Thank you
jbonifaci
What is happening currently? What does $setCurrentProjects contain each time you set it? Have you tried logging the variable contents to see what is going on?
~Jeff
Bhargav Coca
It is not printing anything, the value is null, i mean nothing. The other set variables are working fine. Only this replicant is not printing the output. In other words, it is not setting extended attribute on the Current Projects.
Thank you
jbonifaci
Is there an extended attribute set on the DCR called 'Current Projects' that has an empty value? Or is there no extended attribute at all? If there is no extended attribute at all, then that probably means those lines of code are not being executed.
Now, even if it were working, it probably wouldn't be working the way you want it to. If it were working now, the only value showing up for the extended attribute called Current Projects would be the value of Current Projects in the last replicant. So if you had 20 replicants, only the last replicant would show up in the extended attribute. This is because you have your code within the iterate and it would essentially be setting the attribute 20 times if there were 20 replicants, with the last one winning out. I would suggest removing the code you added to set the attribute in the iterated and move it up into your <iw_perl> block where you are setting your other extended attributes.
What is your goal? If you have 20 replicants, do you want 20 extended attributes called Current Projects1, Current Projects2, Current Projects3, Current Projects4, etc? Or do you want 1 extended attribute called Current Projects that lists all of the Current Projects from each of the 20 replicants? If so, you will need to decide on some sort of delimiter to use between each of the field values, maybe a semi-colon.
~Jeff
Bhargav Coca
If you have seen my dct, it allows only 3 values for that replicants, viz Current Project, Project Status and Non_task related Projects. At any given time, end user will enter only one of each. So there is a situation that we have only one Current Project. i have tried to move my code inside the <iw_perl> code that doesn't set my attribute on this current project one. May be i am missing something in setting the replicant as a n extended attribute. I'll try. Its shouldn't be hard.
Thank you
jbonifaci
Well, from the way the DCT is designed, it appears you can have between 0 and 20 Current Projects in a DCR. Am I missing something?
Bhargav Coca
Correct, it is set from 0-20 values. I should re-code it for my requirements. Meanwhile, I got this working. Current Project is being set as extended attrib, only on item of the replicant can be set to extended attribute in my design. I want it this way. Thank you very much
graph.JPG
jbonifaci
Glad you got it working,
.
~Jeff