gkhn.topcu - Tuesday, December 27, 2011 6:40 AM:
Dear all developers;
I have an htmlfield like below;
I want to get an item property with link like below.When we click it ,it shows us User's Form...
Is this item property with link possible on html field??If possible, how can i manage it:D I examine nearly all method but didnt find a solution..Thanks
souheil - Tuesday, December 27, 2011 10:35 AM:
try to put this code inside the html field. <a href='myform.html'>document.thisItem.getProperty('name')</a>. This will give you a property with a link referencing a form called myform.html. If you need parameters to the form then pass them in the href.
justinlee - Tuesday, December 27, 2011 11:28 PM:
Do you want open your Form when you click link in HTML fields?
I think you can you my code bellow.
function showFormCustom(myItem,myId)
{
var inno = top.aras;
inno.uiShowItem(myItem, myId);
}
and in HTML field you call showFormCustom function in Onclick event.
I hope it will help you.
Lee,
gkhn.topcu - Tuesday, December 27, 2011 11:08 AM:
Thanks but it's not what i need ,I think i can't tell correctly..I need to open ItemType's Form(not external html) which is related to clicked label.
Lets say i have an ItemType called Firms and it has a default form. In Firms , we have Microsoft,Xerox,Logitech etc... , and it's information.
//////
var html = getFieldByName("html_text");
var Item = document.thisItem;
var qry = Item.newItem('Firms','get');
qry.getProperty('name','Microsoft');
var result = qry.apply()
html.innerHTML = result.getProperty('name')+' - '+result.getProperty('addres');
///////
Output : Microsoft - xxx street 17/1 ..
That's all i want ---> when we click Microsoft, Microsoft's Firm Form populate
*
Im really sorry for my bad english:)
*
gkhn.topcu - Wednesday, December 28, 2011 6:38 AM:
Thanks for your response soulheil and justinlee. (uiShowItem) --> That was perfectly work and also I will examine your code soulheil.
Again thanks for reply
souheil - Wednesday, December 28, 2011 12:26 AM:
// This can also work.
// inside the html
<IFRAME frameborder="0" style="width:100%;height:100%" id="myframe" ></IFRAME>
<script language="javascript">
if ( document.thisItem)
{
var item = document.thisItem;
// get item type
var itemtype = item.getType();
// get item default form for the itemtype
var itemForm = getItemDefaultView (itemtype);
// handle the respective form
var formNd = top.aras.getItem("Form", "name='" + itemForm +"'", "<name>" + itemForm + "</name>");
formNdId = top.aras.getFormForDisplay(formNd.getAttribute("id")).node;
top.aras.uiShowItemInFrameEx(document.frames[0], item,"tree view",false, formNdId);
}
//-------------------------------------------------------------------------
function geItemDefaultView(itemtype)
{
var relatedForm = null;
// ItemType
var qryItem = new top.Item("ItemType","get");
qryItem.setAttribute ("select","name");
qryItem.setProperty ("name",itemtype);
// Add the Property structure.
var view = new top.Item("View","get");
view.setAttribute ("orderBy","display_priority");
qryItem.addRelationship(view);
// Perform the query.
var results = qryItem.apply();
// Test for an error.
if (results.isError())
{
alert (results.GetErrorDetail());
return;
}
// Get a handle to the property Items.
viewItems = results.getRelationships();
var theItem = viewItems.getItemByIndex(0);
// Get a handle to the related Item for this relationship Item.
var relatedItem = theItem.getRelatedItem();
if ( relatedItem)
relatedForm = relatedItem.getProperty("name");
return relatedForm;
}
</script>
AbhishekSrivastava - Tuesday, March 22, 2016 4:44 AM:
Hi friends,
I also want quite similar issue, like i need to populate vendor name from vendor item type to other Item type like Test Item Type in a dropdown way.
When i Select value in dropdown then other field like vendor status is populated before save form.
Vendor name and vendor status both value fetch from vendor Item Type
Your solution is appreciable
Thanks in Advance
Abhishek
AbhishekSrivastava - Tuesday, March 22, 2016 5:27 AM:
I use filter list for below image but i am facing below issue , when i select A.P Engineering then nda status comes as Not Expired in form but not save on grid. because i have not clicked on Not Expired, so could u provide any solution .
Thanks
Abhishek

