Passing Query to CFC
I am passing a query to a cfc. When I dump the query in the
cfc it looks fine. However, when I attempt to loop over the query I
get the following error: Complex object types cannot be converted
to simple values.
The expression has requested a variable or an intermediate
expression result as a simple value, however, the result cannot be
converted to a simple value. Simple values are strings, numbers,
boolean values, and date/time values. Queries, arrays, and COM
objects are examples of complex values.
Here is the code:
<cffunction name="updateTYC_Card_Master" access="public"
returntype="void">
<cfargument name="GoodRequests" required="yes"
type="query">
<cfargument name="dsn" required="yes" type="string">
<cfargument name="newjobNo" required="yes"
type="string">
<!--- <cfdump var="#arguments.goodRequests#">
<cfabort> --->
<cfloop query="#ARGUMENTS.GoodRequests#">
<cfquery name="UpdateTYC_Card_Master"
datasource="#ARGUMENTS.dsn#">
Update READONLY.TYC_Card_Master
Set Job_Key = #ARGUMENTS.jobNo#
Where custno = #custno#
And job_key = -1
</cfquery>
</cfloop>
</cffunction>
How would I go about being able to use the contents of the
query that I passed into the cfc. I've never passed in a query
before. Thanks for the help.
mark
It has nothing to do with your query. This
<cfargument name="newjobNo" required="yes"
type="string">
does not match this
Set Job_Key = #ARGUMENTS.jobNo#
Also, your argument specifies a string but your sql does not
have quotes.
Finally, since you are setting all the records to the same
new job number, instead of running a query inside a loop, it is
probably more efficient to run one query which includes something
like
where custno in
(#ValueList(arguments.yourquery.custno)#)
Similar Messages
-
Pass query string in Flex Builder debug?
Hi,
I'm trying to figure out how to launch a debug session while passing query strings in Flex Builder. If I open up the Debug dialog, and uncheck "Use Defaults" and attempt to add my query string to the Debug Path text field, Flex Builder states that "The file cannot be found to launch". How do I pass a query string to debug in a SWF with Flex Builder?
Thank you.If I understood your question correctly.
go to html-template/index.template.html and add the query string there and everything you run the app the query string should be there.
Hope this helps,
BaBo, -
Is it possible to pass Query parameters between two XLF's
Hi,
I have a parent dashboard (.xlf) and i'm trying to launch another .xlf (child) from the main dashboard using OpenDocURL.
Is it possible to pass Query Parameters from parent to the child using OpenDocURL ?
If not , how we can do it ? . I don't want to use SWF loader to load the child dashboard.
I'm using SAP Dashboard 4.1 SP4.
Thanks,
Shiva.Hi Permisindo,
I tried the approach suggested in the blog, but the parameters are not being passed.
I have a master xlf and a child swf. I used swf loader to load the child and pass the paramters.
Here is the URL -
http://<Server>:8080/BOE/Xcelsius/opendoc/documentDownload?sIDType=CUID&iDocID=<doc id>&sKind=Flash&Fac=All Departments&RoomGroup=All Rooms
I created the flash varibles(Fac , RoomGroup) in the child swf which i mapped to the respective query trigger cells. -
Dear Expert
I want to pass query to the KM Search iview, I want to pass a couston property and based on the property the documents need to be displayed
How to pass the query to KM Search ivew
Regards
NoelHi Noel,
Try the follwing URL
https:/your.portal.com/irj/servlet/prt/portal/prteventname/HtmlbEvent/prtroot
/pcd!3aportal_content!2fevery_user!2fgeneral!2feu_role!2fcom.sap.km.
home_ws!2fcom.sap.km.hidden!2fcom.sap.km.
urlaccess!2fcom.sap.km.basicsearch?
SearchType=ctrlpers&
SelectedSearchIn=FROM_HERE&
SearchVisible=false&
rndLayoutSet=aSearchResultLayoutSet&
SelectedCustomProps=aNamespace:aProdId(value=aValue/operator=EQ)&
disDidYouMean=true&
QueryString=aString&
SelectedSearchFolder=/documents/Public+Documents
Regards
BP -
Pass query to the report through form
Hello everybody...
I m using forms and reports 6i.
I create query through form depends on user selection.
Means user select specified columns from specific table. And finally i create complete query.
Now i wanna pass that query to report builder and wants to generate automatic report depends on that query.
Can anybody have idea how to do this?
How to pass query from form and generate report.
If any1 knows then please help meYou should pass all columns but with separator character i.e.:
supl_cd||';'|| supl_name ||';' city ||';'|| add1 ||';'|| add2 ||';'|| pincode ||';'|| country my_column
You should also pass column names if you want and get them back using the same procedure.
Procedure for retrieving should use instr,loop and srw.do_sql, if you don't know what is SRW built in package, then take a look in report's help. That's a pity that there is nothing similar in forms. You can use dynamic select to pass values exactly to the report's variables:
for i in 1..10 loop
srw.do_sql('select '||i||' into :cp_'||i||' from dual');
end loop;
Jakub Flejmer -
Problem passing values to cfc component
I have a cfc component with methods to insert, retrieve and
update a record in a table. There are several forms associated with
the component, each which handles a subset of the fields in the
table. The update method is called with arguments that identify
which subset of fields is to be modified and the values for those
fields.
The forms typically have a couple of radio button groups and
a couple of lists, most of which allow multiple selections. I want
to create a variable for each radio button group and each list. The
variables give the button selected (for the buttons) and a string
of the values selected (for the lists). These are to be passed as
arguments to the update method.
I can construct the variables using standard Java script
statements (if, for,etc.). But if I do, CFINVOKEARGUMENT doesn't
recognize them. The same thing happens if I try to use CFQUERY
directly. I get a message like "variable is undefined". If I try to
set the values using CFSET statements, it doesn't recognize the
form fields. It says the field is not an element of the form.
So I can look at the form fields to create a variable but
then the variable can't be used by the update method. Or I can
create an argument that can be passed to update, but it doesn't
know anything about the form values. I've tried all variations I
can think of with and without #'s and single & double quotation
marks.
Suggestions would be appreciated.See in line comments.
waz69 wrote:
> Sorry for the delayed response...I was pulled away right
after I posted my
> problem. Here are extracts from the code. I've only
included the sections
> that deal with updating the table.
>
> In the CFC file:
>
> <cffunction access="public" name="SaveFormValues"
output="false"
> returntype="boolean">
> <cfargument name="Screen" type="string"
required="yes">
> <cfargument name="Arg1" type="string"
required="yes">
> <cfargument name="Arg2" type="string"
required="yes">
> <cfargument name="Arg3" type="string"
required="yes">
> <cfargument name="Arg4" type="string"
required="no">
> <cfargument name="Arg5" type="string"
required="no">
> <cfargument name="Arg6" type="string"
required="no">
> <cfset var isSuccessful=true>
> <cftry>
> <cfquery name="SaveValues" datasource="FPDS
Sample">
> UPDATE Report_specs SET
> <cfif arguments.Screen EQ "Scope">
> ReportOn = '#arguments.Arg1#',
> SubtotalGroup = '#arguments.Arg2#',
> Projects = '#arguments.Arg3#',
> Sites = '#arguments.Arg4#'
> </cfif>
> <cfif arguments.Screen EQ "Criteria"> (,,code goes
here for next set of
> fields...) </cfif>
> <cfif arguments.Screen EQ "Table"> (,,code goes
here for next set of
> fields...) </cfif>
> <cfif arguments.Screen EQ "Chart"> (,,code goes
here for next set of
> fields...) </cfif>
> <cfif arguments.Screen EQ "Detail"> (,,code goes
here for next set of
> fields...) </cfif>
> WHERE Report_specs.rid = #Session.FPRU_rid#
> </cfquery>
> <cfcatch type="Database"><cfset
isSuccessful=false></cfcatch>
> </cftry>
> <cfreturn isSuccessful />
> </cffunction>
>
> In the CFM file:
>
> <head>
> <script language="JavaScript">
>
> function SaveValues(frm) {
> var RptOn="", SubGrp="", SL="", PL="" ;
> for(var i=0; i<3; i++)
> {if(frm.ReportOn
.checked) RptOn = frm.ReportOn.value ;
> if(frm.SubtotalGroup
.checked) SubGrp = frm.SubtotalGroup.value ; } ;
> for(i = 0; i < frm.Projects.options.length; i++)
> {if(frm.Projects.options
.selected ) PL = PL + ', ' +
> frm.Projects.options.value ; } ;
> for(i = 0; i < frm.Sites.options.length; i++)
> {if(frm.Sites.options
.selected ) SL = SL + ', ' +
> frm.Sites.options.value ; } ;
>
> ...(This is the section where I'm having problems. I
have the values I want
> to pass the variables just defined.
> But I can't get them into the CFINVOKEARGUMENT
statements below. I've
> tried variations of #'s, CFSETS, etc.)...
>
> <cfobject component="RecordAccess"
name="SaveValues">
> <cfinvoke component="#SaveValues#"
method="SaveFormValues" >
> <cfinvokeargument name="Screen" value="Scope">
> <cfinvokeargument name="Arg1" value="RptOn">
> <cfinvokeargument name="Arg2" value="SubGrpr">
> <cfinvokeargument name="Arg3" value="PL">
> <cfinvokeargument name="Arg4" value="SL">
> </cfinvoke>
> }
>
> </script>
> </head>
This is never going to work. JavaScript is executed on the
client's
computer in the browser. It is no idea of what is CFC is or
how to
access one. The cfc lives on the server, it can only exist
and run
while the http request is being built by the CF engine.
>
> <body onFocus="GetValues(this.form)" >
>
> <form action="" method="post" name="ScopeDetail"
id="ScopeDetail">
> <table width="85%" border="0" cellspacing="2"
cellpadding="2">
> <tr>
>
> ...(various buttons)...
>
> <td width="8%"><input name="SaveForm"
type="button" id="SaveForm"
> onclick="SaveValues(this.form)"
value="Save"></td>
>
> ...(other buttons)...
>
> </table>
>
> <table width="96%" border="0" cellspacing="2"
cellpadding="2">
> <tr>
> ...(column headers)...
> </tr>
>
> <tr>
> <td rowspan="3" align="right"
valign="top"> </td>
> <td height="110" colspan="2" align="right"
valign="top"><div
> align="left">
> <p>
> <label> <input name="ReportOn" type="radio"
value="Users" checked>
> Unique users</label>
> <br>
> <label> <input type="radio" name="ReportOn"
value="AllVisits"> All
> visits</label>
> <br>
> <label> <input name="ReportOn" type="radio"
value="LastVisit"> Last visit
> only</label>
> <br>
> </p>
> </div></td>
> <td rowspan="3" valign="top"> </td>
> <td colspan="3" rowspan="3"
valign="top"><p><select name="Projects"
> size="10" multiple id="Projects"
onChange="getSites(this.form)"><cfoutput
> query="ProjectList">
> <option
>
value="#ProjectList.projectid#">#ProjectList.projectname#</option>
> </cfoutput></select></p></td>
> <td width="3%" rowspan="3"
valign="top"> </td>
> <td width="34%" rowspan="3"
valign="top"><select name="Sites" size="15"
> multiple id="Sites">
> <option> ---------------------------------------
</option>
> </select></td>
> <tr>
> <td height="23" colspan="2" align="right"
valign="top"><div align="left">
> <h3>Show Summaries of </h3>
> </div></td>
> <tr>
> <td height="100" colspan="2" align="right"
valign="top"><div
> align="left">
> <label> <input name="SubtotalGroup"
type="radio" value="Both" checked>
> Project & Sites</label>
> <br>
> <label> <input type="radio"
name="SubtotalGroup" value="Projects">
> Projects only</label>
> <br>
> <label> <input type="radio"
name="SubtotalGroup"
> value="Sites"> Sites only</label>
> </div></td>
>
> </table>
> </form>
> </body>
waz69 wrote:
> I tried creating hidden fields to which I assign my
desired values. The
> CFINVOKEARGUMENTs then become:
>
> <cfinvokeargument name="Arg1" value=frm.Hide1>
> <cfinvokeargument name="Arg2" value=frm.Hide2>
> etc.
>
> What ends up in the table is the name of the field
(frm.Hide1) not
the value
> of the field. I've also tried with with quotes (single
and double)
which give
> the same result and with #'s which gives me an error
about undefined
element.
>
This is what your are going to need to do. But the javascript
form
object no longer exists once the request has been sent to the
server.
After that you are dealing with the "form" structure. So your
arguments
are going to look something like.
<cfinvokeargument name="Arg1" value="#form.Hide1#">
OR interchangeably
<cfinvokeargument name="Arg2" value="#form['Hide2']#">
When blending JavaScript and ColdFusion, one must be
constantly aware of
the order of actions. JavaScript can only run and exist on
the client,
it has no direct knowledge of any ColdFusion variables or
logic.
Vice-a-versa, ColdFusion only runs and exists on the server.
It has no
direct knowledge of the Client or its state.
To blend the two you have to carefully pass any required,
shared
information from one location to the other. -
Passing parameter to CFC while using CFGRID bind
I am attempting to use CFGRID to display some data. I have a
CFGRID set up using a bind to a CFC which is fine for a hard coded
SQL but I want to pass a parameter.
I started with the example at
http://www.garyrgilbert.com/blog/ind...sion-8s-CFGRID
I'd like to pass one or more variables to filter down the
result set.hi there, did you get this to work? I'm experiencing the same problem. i'd like to bind and pass the CFGRIDKEY to my CFC to filter my query results and then pass back the new results to my cfgrid. at this point i have no problem passing my new parameters as an argument in the json string or as a url paramenter when calling my CFC directly. however, my CFGRID keeps wigging out because it can't see the URL.CFGRIDKEY coming in. thoughts?
here's the process, page load with all users assigned to all classes in my CFGRID. user then clicks on a class number in the grid or selects a class number for a drop down selection form, to view all students assigned to a particular class.
as mentioned above, I can actually get the results i need when calling my CFC directly: http://127.0.0.1:8500/DREST_Pro/admin/getUsers.cfc?method=SPActiveUsers&returnFormat=json& argumentCollection={"gridpage":1,"gridpagesize":10,"cfgridkey":16,"gridsortcolumn":"","gri dsortdirection":""}&_cf_nodebug=true&_cf_nocache=true&_cf_clientid=76578301E64A507D8CD8F77 D078EA17A&_cf_rc=0&intclassid=18&cfgridkey=18
and i can do this either by adding the cfgridkey argument into the argumentCollection or i can filter my results by appending the cfgridkey as a URL param.
the problem seems to be in my binding of a new parameter when building my cfrid:
<cfform name="getUsers">
<cfgrid format="html" name="displayUsersActive" appendkey="yes" hrefkey="intfkclassid" href="allEnrolled.cfm" selectmode="row" striperows="yes" pagesize="10" bind="cfc:getUsers.SPActiveUsers({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgrid sortdirection},{cfgridkey})" width="650" height="400">
<cfgridcolumn name="intfkclassid" display="no">
<cfgridcolumn name="txtLName" header="Last Name" headerbold="yes" width="20">
<cfgridcolumn name="txtFName" header="First Name" headerbold="yes">
<cfgridcolumn name="startdate" header="Start Date" width="30" headerbold="yes">
<cfgridcolumn name="enddate" header="End Date" headerbold="yes">
<cfgridcolumn name="classno" header="Class No" headerbold="yes">
</cfgrid>
</cfform> -
Passing query parameter through xcelsius 2011 at run time
I am using reporting service as a web connectivity and I am trying to pass the query parameter at run time from the dashboard. While executing the xcelsius at first time it is working well with the default value but after passing the parameter from combo box, the data is not loading. It is not returning anything except the field name.
I am new to this xcelsius. Your help will be really appreciated.
Thanks.Hi,
if you do the following thing,i think it may be helpfull,
First select Data in menubar>Connection->select required connection>select the useage option in connection definition window>give trigger cell value as combo box destination cell.
Thanks,
Ramana -
Passing query template name to BLS SQL action in the link editor
I want to have one transaction that uses the SQL query action, but which query template it uses will be dependent on some user input. I am having trouble passing the query name. I'm using the full file path in xml format (i.e. "c://<folder1>//<folder2>//<folderN>//"&PassedFileName&".xml", but with backslashes instead of forward slashes). I got an error around the connector, so I set that too. Then I got an error around mode, so I set it to "FixedQuery". Now I'm getting, "The Query expression was not set with the Query parameter".
There are only 3-5 possible queries that will be used, so I'd rather build SQL queries and just pass the transaction the name of the query, as opposed to passing the full text of the query each time.
Thanks,
Carrie
Edited by: Carrie Schimizzi on May 9, 2008 6:38 PM
Edited by: Carrie Schimizzi on May 9, 2008 6:39 PM
Edited by: Carrie Schimizzi on May 9, 2008 6:40 PMCarrie,
If you haven't already done so, configure your master BLS transaction with a proper representative runtime variation, which will make the whole process simpler to create and troubleshoot. Quite often when people try to use the dynamic capabilities of MII, they end up getting confused because of user over-complication. In your SQLQuery action block make sure you configure it to a valid template that would be one that the user would provide as an input (don't forget to allow the generation of sample results for making any subsequent trx efforts easier). Then look in the link editor and you should see this string value for the query template link if you hover over the corresponding blue T icon. This will show you the format you need to provide from your Transaction input property (which should also have a valid default value assigned so you can test the transaction by itself, without needing to initially rely on the Xacute Query template layer.
Regards,
Jeremy -
I'm having trouble passing a variable value called from a CFC
into Flex via RemoteObject. Basically I'm trying to pass the
current logged-in user to a Combobox as a string. The Web directory
in IIS is set to dissallow anonymous access and is set to
Integrated Windows Authentication. The CFC is in the secured
directory as well as the Flex app. If I change the CGI variable to
something like #cgi.remote_addr# among others it works fine so I
know it's not the actionScript or CFC code. Any ideas as to why
#cgi.auth_user# is passing as an empty string?? One more caveat. If
I invoke the function in my CFC from a .cfm page the auth_user is
displayed as expected.
------------------------------------------------------------------------------------------ ----------To use RemoteObject with PHP you need to download AMFPHP and
make some settings.
To download go here:
null.
To understand how to use it with Flex go here:
null.
This is a video tutorial of about 7-10 minutes which will show you
all you need you need to know to set AMFPHP in 'conversation' with
Flex.
Good luck! -
Creating a function and passing query value
I have what I thought was a pretty easy to resolve situation:
I want to concatenate two query fields, if the 2nd one isn't empty.
I created a function:
<cfargument name="q1" value='#query.q1#' />
<cfargument name="q1a" value='#query.q1a#' />
<CFSET variables.myPunct = ": ">
<cfset variables.ResultVar="">
<cfif Trim(arguments.q1) NEQ "">
<cfset variables.ResultVar='#arguments.q1#'>
</cfif>
<cfif Trim(arguments.q1a) NEQ "">
<cfif variables.ResultVar NEQ "">
<cfset variables.ResultVar='#variables.ResultVar &
variables.myPunct#'>
</cfif>
<cfset variables.ResultVar='#variables.ResultVar &
arguments.q1a#'>
</cfif>
<cfreturn variables.ResultVar>
This is basically just the example they provide in the online
instruction, with the names changed.
In the detail band of my report, I have an expression builder
field containing: report.mytestfunction()
When I run this, I get: Element Q1 is undefined in ARGUMENTS.
I've tried this ninety different ways (literally). It seems
very clear to me that the query.q1 (for that matter, any of the
query results) are NOT getting passed to the function. I have tried
making the expression: report.mytestfunction(query.q1). I have
tried creating an input parameter.
The documentation on this is ridiculously limited,
considering that the ability to implement conditional logic depends
entirely on the "function", as far as I can tell. I can in no way
get the function to interface with the query results. If is set
fixed values in the function, as opposed to trying to use the query
variables, it outputs fine.
Any ideas?That has got to be the only way I DIDN'T try, although I
could swear I tried that, too. Maybe I didn't have the "required"?
I don't know. I know it works now. For the record, FUNCTION:
<cfargument name="q1" required="yes" />
<cfargument name="q1a" required="yes" />
<CFSET variables.myPunct = ": ">
<cfset variables.ResultVar="">
<cfif Trim(arguments.q1) NEQ "">
<cfset variables.ResultVar='#arguments.q1#'>
</cfif>
<cfif Trim(arguments.q1a) NEQ "">
<cfif variables.ResultVar NEQ "">
<cfset variables.ResultVar='#variables.ResultVar &
variables.myPunct#'>
</cfif>
<cfset variables.ResultVar='#variables.ResultVar &
arguments.q1a#'>
</cfif>
<cfreturn variables.ResultVar>
In the "Detail" band, called function:
report.mytestfunction(query.q1, query.q1a)
Thanks for the tip. I'm going to go take a long walk on a
short pier now.
max -
How to pass query string from content editor webpart to another?
Hi All,
I am using content editor web-part to show GooglePiechart for workflow status column in a list. When user click on chart, i need to show particular clicked area data in another list web-part. So that, i need to pass the query value from content editor
web-part to another web-part. How to achieve this scenario?Hi Sam,
What you can do is using SPD create a data view webpart which excepts query string value as filters as shown in the below article
http://madanbhintade.wordpress.com/2012/01/08/sharepoint2010dataviewwebpart/
http://sharepoint.stackexchange.com/questions/55184/how-to-filter-dataview-webpart-dvwp-from-query-string
Then When you click on the pie charts particualr section perform a post back by appending the required query string paramter to the same page on which your webpart exist
Raghavendra Shanbhag | Blog: www.SharePointColumn.com
Please click "Propose As Answer " if a post solves your problem or "Vote As Helpful" if a post has been useful to you.
Disclaimer: This posting is provided "AS IS" with no warranties. -
Passing Struct To CFC Within A Grid Bind
Why does the following not work? When trying to pass the
struct it gives me the error "Complex object types cannot be
converted to simple values." Can I not pass structs within binds to
a CFC? Obviously in this example i'm only passing a single numeric
value, but what I really want to do is pass a full struct that
contains a list. If there's an easier way to pass a list, that
works too!cf has a nice listchangedelims() function - you can change
the list
delimiter from comma to, say, | (pipe), and in your cfc
either specify
pipe as delimiter in any list functions you use or change it
back ot
comma using the same function.
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/ -
How to pass query parameter from HTML in SAP XMII
I need to pass the value to query parameter from html .i m quite confused about how to do that .can anyone give me a valid point....
Ramesh,
Addition of Rupesh,
U can also pass in the form of INLINE paramters.
Like
<Applet name = <appletname> width .......>
<param NAME = "param.1" VALUE = <value>
<param NAME= "param.2" VALUE = " <value>
</APPLET>
Thanks
Hari -
How to pass query result to HTML table?
Hi,
i want to get the query result in HTMl table instead of Display Grid. how to do it? i searched in help, it suggests use icommand to do this. but i dont know how to pass the select query result to HTML table.. please help me.
-senthilHi Senthil,
You can create an icommand query. You can then use the icommand retrieval methods to capture and manipulate the query data.
(http://help.sap.com/saphelp_xmii115/helpdata/en/Applet_Reference_Details/iCom
mand_Reference.htm)
Basically what we did was, use the getColumnCount() and getRowCount() methods, once you have these two numbers you can set two for loops and use String getValue(int ColID, int RowID) , within the for loops you can generate the inner html content and write the values either in a html table or html form (which is what we did). This seems to work well, I'm still playing around with it and may post this approach on sdn by end of this week.
Mahwish
Maybe you are looking for
-
Safari crash, OS 10.3.9, Safari 1.3.2
Yes, it is an old OS. Yes, it is an old Safari. Safari crashes about once each day. Do I need to reset Safari? I do not have the money resources to upgrade to OS 10.4. I need to limp along with 10.3.9 for a longer time. Any assistance will be greatly
-
Analysis Services Execute DDL Task Internal error
Hi all, I need help in solving this sporadic problem... the dimension below (blanked out as xxxx) is based on a view. The cube processes fine many times - but fails - abruptly once a week... it's being called from a sql job. Any ideas? Thanks in a
-
Hello, I've created a file test.txt with some example content and uploaded it to xml db via ftp. When I execute SELECT r.RES.getClobVal() FROM RESOURCE_VIEW r WHERE equals_path(RES, '/LCS/order/V23184/test.txt') = 1; i get <Contents> <text>this is my
-
"open with" menu, QT entry is duplicated...
hi! i have the following problem with the "open with" menu: this occurs only with quicktime and .flv, .wmv, .divx and .asf files. i´ve tryed following terminal command /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/ LaunchSer
-
Hello, I tried several different routers, but could never get my new Seagate 4tb external hardrive to connect to use with Time Machine. I finally gave up and purchased a new Time Capsule today. It's a work of art, and working well as a router and har