Jump to content

This topic is 8176 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi, I'm new to Filemaker so I need all the help I can get.

I've created two related databases to keep track of my foreing exchange orders and my bank loans (which are mostly used to finance international purchases).

Anyway, I designed the relationship so I have one layout that shows the international purchase detail, (supplier, country, items, etc) and a portal within with the financial information about it, which includes the loan amount, currency, bank, etc.

In FM, whenever I click in the portal, it goes to the "Banks" database and displays the related record.

So far so good. Until...

We only have one license for FM, so I share the database over the intranet. Users can browse records, perform searches, etc. But when they click the portal in the foreing exchange layout, it goes to the search layout of the "Banks" database.

What can I do to make web companion behave like FM??

Regards from Chile

Matias

Posted

I have used Instant for a number of items. I have ended up porting most everything over to custom. Instant has some GREAT uses. As to the question of going to related records in instant, I hate to say there is no reliable way to get it to work. According to the documentation the Go To Related Record script is supported in instant, but I never got it to work on any consistent basis.

Two solutions you might consider. Two links in your main filemaker database that use the Go To URL. One can be labeled "Create New Records" and one can be "Edit Records". These 2 urls will direct users to the related database.

Then use a specific URL in filemaker to accomplish each task. Have your related database set so that it has a layout that shows records in table format. Then your url link can be based on a search criteria and be something like this:

http://63.226.105.000/FMRes/FMPJS?-db=Budgets.fp5&-lay=Table&-max=all&-sortfield=user&-sortorder=ascend&-format=tablevwcss.htm&-mode=table&-find=

You can also have a URL that will go to the related database and go right to edit mode for entering a new record.

http://63.226.105.000/FMRes/FMPJS?-db=Budgets.fp5&-lay=Entry&-format=newcss.htm&-max=1&-token.0=250&-mode=new&-sortfield=user&-sortorder=ascend&-op=bw&-lop=and&-find

I also did some playing in filemaker with the go to url command by trying to include a record ID in the url that pointed to the current record, thus going to the related record. In theory it should work, I never got far enough into it to try it out. Maybe something like this:

&-max=all&-sortfield=user&-sortorder=ascend&-format=tablevwcss.htm&-mode=table&-find=]http://63.226.105.000/FMRes/FMPJS?-db=Budgets.fp5&-lay=Table&-recid=[FMP-CurrentRecordID]&-max=all&-sortfield=user&-sortorder=ascend&-format=tablevwcss.htm&-mode=table&-find=

LR

Posted

hi, just happened to have a page open right now with a little portal list of contacts. You click the contact to edit their info in a small window. Maybe this'll help:

the portal:

[FMP-PORTAL: companies]

<TABLE BORDER=0 CELLSPACING=0 WIDTH=187>

<TR>

<TD BGCOLOR="#FFFFFF">

<P><A HREF="javascript:openAWindow('http://www.mydomain.com:591/directory/FMPro?-db=mydatabase&-lay=layout1&-format=co_recorddetail_small.htm&-error=co_recorddetail_small.htm&-op=eq&recordnumber=[FMP-Field:companies::recordnumber]&-Find','win2',375,300,0)">[FMP-FIELD: companies::contact_name]</A><BR>

[FMP-FIELD: companies::tel]<BR>

</P>

</TD>

</TR>

</TABLE>

[/FMP-PORTAL]

(I'm using a record number instead of the FMP record ID for the link)

and to make the window open:-

<SCRIPT LANGUAGE=JavaScript><!--

function openAWindow( pageToLoad, winName, width, height, center) {

xposition=0; yposition=0;

if ((parseInt(navigator.appVersion) >= 4 ) && (center)){

xposition = (screen.width - width) / 2;

yposition = (screen.height - height) / 2;

}

args = "width=" + width + ","

+ "height=" + height + ","

+ "location=0,"

+ "menubar=0,"

+ "resizable=1,"

+ "scrollbars=1,"

+ "status=0,"

+ "titlebar=0,"

+ "toolbar=0,"

+ "hotkeys=0,"

+ "screenx=" + xposition + "," //NN Only

+ "screeny=" + yposition + "," //NN Only

+ "left=" + xposition + "," //IE Only

+ "top=" + yposition; //IE Only

window.open( pageToLoad,winName,args );

}

// --></SCRIPT>

.......in the page header. If you dont want the java stuff, then just use a plain HREF link

The new contact and search link looks like this:

<TABLE BORDER=0 CELLSPACING=0 WIDTH=86>

<TR>

<TD>

<CENTER>contacts</CENTER>

</TD>

</TR>

<TR>

<TD>

<CENTER><A HREF="javascript:openAWindow('http://www.mydomain.com:591/directory/FMPro?-db=mydatabase&-lay=Layout1&-format=companysearch_small.htm&-view','win2',375,300,0)"><FONT SIZE="-1"><B>Search</B></FONT></A></CENTER>

</TD>

</TR>

<TR>

<TD>

<CENTER><A HREF="javascript:openAWindow('http://www.mydomain.com:591/directory/FMPro?-db=mydatabase&-lay=Layout1&-format=newcompany.htm&-view','win2',375,300,0)"><FONT SIZE="-1"><B>new

entry</B></FONT></A><B><BR>

</B></FONT></CENTER>

</TD>

</TR>

</TABLE>

hope this is some help,

jeff

Posted

Here is another version, similar to Jeffs, however a Javascript function opens the new window or submits the appropriate form.

Between the <head.. tags:

<script>

function addrow(additemid)

{

document.addrowfm.elements[8].value = additemid ;

document.addrowfm.submit() ;

}

function rmvrow(rmvrecid)

{

if (confirm("Remove Item?")) {

document.rmvrowfm.elements[7].value = rmvrecid ;

document.rmvrowfm.submit() ; } ;

}

function showitem(showitemid)

{

window.open("","itemdetails","status=no,resizable=yes,scrollbars=yes,width=580,height=390") ;

document.itemdetailsfm.elements[7].value = showitemid ;

document.itemdetailsfm.submit() ;

}

</script>


Here is the Portal display beween the <body... tags:
[FMP-Portal:quote_Id_rel]

<a href="Javascript:showitem('[FMP-Field:quote_Id_rel::item_id]');">[FMP-Field:quote_Id_rel::item_id]</a>

[FMP-Field:quote_Id_rel::item_name]

<input type="text" name="quote_Id_rel::quanity.[FMP-CurrentPortalRowNumber]" value="[FMP-Field:quote_Id_rel::quanity]" size="4">

[FMP-Field:quote_Id_rel::sell_price_ex_tot_txt]

[FMP-Field:quote_Id_rel::supplier_price_old]

<a href="Javascript:rmvrow('[FMP-Field:quote_Id_rel::rec_id]');">remove</a>

[/FMP-Portal]


I have removed the table formatting for clarity.

All the best.

Garry

This topic is 8176 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.