Starting Process from Custom Form

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
customaware
Posts: 2407
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Starting Process from Custom Form

Post by customaware »

I have a Custom for that looks like this....

<div class="aw-data-item" >
<table class="page_three" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table border="0" cellpadding="0" cellspacing="0">
<tr>
<th class="solution_solution">Solution</th>
<th class="solution_price">Price</th>
<th class="solution_unit">Unit</th>
<th class="solution_employee">&nbsp;</th>
</tr>
<tr>
<td class="solution_text" rowspan="5" valign="top">{SolutionText}</td>
<td class="solution_price">{SolutionPrice}</td>
<td class="solution_unit">{DefaultCurrency}</td>
<td class="solution_employee" rowspan="5" valign="top"><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="#"><img src="images/edit.png" alt="">&nbsp; Edit</a></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><a href="#"><img src="images/delete.png" alt="">&nbsp; Delete</a></td>
</tr>
</table></td>
</tr>
<tr>
<td class="solution_price">{PrimaryPrice}</td>
<td class="solution_unit">{PrimaryCurrency}</td>
</tr>
<tr>
<td class="solution_price">{SecondaryPrice}</td>
<td class="solution_unit">{SecondaryCurrency}</td>
</tr>
<tr>
<td class="solution_price">&nbsp;</td>
<td class="solution_unit">&nbsp;</td>
</tr>
<tr>
<td class="solution_price">&nbsp;</td>
<td class="solution_unit">&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
</div>

I then want to set the link to Edit the record . So I change the above to this....

<div class="aw-data-item" >
<table class="page_three" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table border="0" cellpadding="0" cellspacing="0">
<tr>
<th class="solution_solution">Solution</th>
<th class="solution_price">Price</th>
<th class="solution_unit">Unit</th>
<th class="solution_employee">&nbsp;</th>
</tr>
<tr>
<td class="solution_text" rowspan="5" valign="top">{SolutionText}</td>
<td class="solution_price">{SolutionPrice}</td>
<td class="solution_unit">{DefaultCurrency}</td>
<td class="solution_employee" rowspan="5" valign="top"><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="#" onclick="AwareApp.startProcessFromForm ('<<EditSolution>>', ‘main’, this, false)"><img src="images/edit.png" alt="">&nbsp; Edit</a></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><a href="#"><img src="images/delete.png" alt="">&nbsp; Delete</a></td>
</tr>
</table></td>
</tr>
<tr>
<td class="solution_price">{PrimaryPrice}</td>
<td class="solution_unit">{PrimaryCurrency}</td>
</tr>
<tr>
<td class="solution_price">{SecondaryPrice}</td>
<td class="solution_unit">{SecondaryCurrency}</td>
</tr>
<tr>
<td class="solution_price">&nbsp;</td>
<td class="solution_unit">&nbsp;</td>
</tr>
<tr>
<td class="solution_price">&nbsp;</td>
<td class="solution_unit">&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
</div>

Clearly I am doing something wrong because when I save it, Aware truncates the code and I am left with only this....

<div class="aw-data-item" >
<table class="page_three" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table border="0" cellpadding="0" cellspacing="0">
<tr>
<th class="solution_solution">Solution</th>
<th class="solution_price">Price</th>
<th class="solution_unit">Unit</th>
<th class="solution_employee">&nbsp;</th>
</tr>
<tr>
<td class="solution_text" rowspan="5" valign="top">{SolutionText}</td>
<td class="solution_price">{SolutionPrice}</td>
<td class="solution_unit">{DefaultCurrency}</td>
<td class="solution_employee" rowspan="5" valign="top"><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="#" onclick="AwareApp.startProcessFromForm ('<<EditSolution>>'

Can anyone please suggest what I am doing wrong here?
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Post by Rennur »

change ‘main’ to 'main'
customaware
Posts: 2407
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Post by customaware »

Hi Rennur,

That did not fix.

I have spent hours and tried many variants.....

As you suggested....no go
<td><a href="#" onclick="AwareApp.startProcessFromForm ('<<EditSolution>>', 'main', this, false)"><img src="images/edit.png" alt="">&nbsp; Edit</a></td>

from other posts on the forum.....such as...

<td><a href="javascript:AwareApp.editObject('Solution',<<Solution.ID>>,'main');"><img src="images/edit.png" alt="">&nbsp; Edit</a></td>

<td><a href="javascript:AwareApp.editObject('Solution',<<Solution.ID>>,'main');">Edit</a></td>

<td><a href="javascript:AwareApp.editObject('Solution',1234,'main');"><img src="images/edit.png" alt="">&nbsp; Edit</a></td>

<td><a href="javascript:AwareApp.editObject('Solution',1234,'main');">Edit</a></td>

plus a bundle more....

Every time the code gets truncated after the first argument of the AwareApp call as soon as I save it.

The only one that saves ok is <td><a href="#"><img src="images/edit.png" alt="">&nbsp; Edit</a></td>
As soon as I modify the href is bombs.

Have tried reconstructing from every level....form cell, form section and the form.

no go.

Doing my head in! ;-)
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Post by Rennur »

Is this custom form a Presentation, Query or a HTML cell?
customaware
Posts: 2407
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Post by customaware »

Custom Date template for a Reference attribute in a cell of a normal form Rennur.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Post by Rennur »

I've tried a few things but I'm getting the same thing. Something is breaking the HTML code.

I've also got an Config Tool error message when I removed the true and false statements:
Exception while saving the object For input string: " "

Also (I've reported on another post), if you use the @ symbol anywhere on the custom form, it will break the code and truncate everything after and including the @ symbol.
customaware
Posts: 2407
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Post by customaware »

Great....

At least now I know it's not just me.....Phew! ;-)
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Post by Rennur »

Support,

Bug Report,

As mentioned @ symbol anywhere truncates the code, in this post's case

Code: Select all

 ', 
apostrophe followed by a comma does the same.

Cheers
customaware
Posts: 2407
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Post by customaware »

About to hop on a plane but I think there is a @
In my CSS file.

Will check it out and will let you know.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Post by Rennur »

I don't think CSS is the cause.
RafaMD
Posts: 52
Joined: Wed Mar 16, 2011 6:22 am
Location: Spain

Post by RafaMD »

Try this: Use &#39 instead of ' and &#44 instead of ,


Sample:


<a href="#" onClick="AwareApp.startProcess2(&#39{Process}&#39&#44&#39{Objet_Name}&#39 &#44 {Objet_ID} &#44 &#39new_tab&#39)">{Field}</a>
ACDC
Posts: 1143
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Post by ACDC »

I recently had a similar problem and got around it by creating 3 or 4 Link attributes in the SystemSettings object and then inserting the html layout by logging in and inserting the url parts.
(You can't make the attributes initialise with the html because of the bug so you need to log in and set the html )

Then on the object have a Link attribute that contains the link which is built by a rule on the object referencing the Link attributes in system settings and on the object itself.(so the link is embedded into each object and is called by <<YourObject.Link>>) - that was the only way I could get it to work
customaware
Posts: 2407
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Post by customaware »

OMG!

All this only to be able to display a cell in a query line that has more than a single line of data.

Surely there is a simpler way. :-/
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

In custom templates you have to refer to attributes using {}, not <<>> and omit the object name, so:

instead of:
<<Solution.ID>>

you should have:
{ID}
Aware IM Support Team
customaware
Posts: 2407
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Post by customaware »

Thanx to awesome support from the Aware team....

This issue has been fixed in a new build 1812 and available now!

Brilliant!
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Post Reply