ASP.NET: How to filter a query with URL parameter?

OS info

  • Operating System : Windows 10.0.17134
  • Wappler Version : 1.7.1

URL filter does not capture passed value

Steps to reproduce

  1. Set up href in previous page that has the form of{{OWNER}} with identifier referring to a primary key value.

  2. Load page listing possible names and click on link.

  3. New page opens but does not filter. Notice the difference in Identifier on page reference and return value which is a default value.

This occurs in all variations of passing parameters with the exception of using text fields that work as expected.

I serious problem also occurs because there is no way to update the database and has failed repeatedly. Database searches and updates work well using very old ASP technology and old dmx extensions. I am attempting to rewrite a large older database using Wappler and it just doesn’t seem to work for me. The Update problem was reported in November and never solved.

report_2018-11-27_15-33-8.zip (134.1 KB)

Thanks for any help you can provide.

Hi,
How are you passing the url parameter to the page? Are you sure that’s setup properly?
Is the value in the field coming from a database query? If yes, have you properly filtered it?

I am passing the URL in the format of target page address.html? identifier={{identifier}}.

The target page should receive it in the in the GLOBAL Get Variable “ identifier” and use it to filter the data to return the unique record based on the “ identifier” column.

Because of the failure to capture a value from the URL “identifier”, I included a default value, which filters the return , but never changes to the selected value. As there is no apparent mechanism of determining the if the URL value has been established, I am assuming that no value has been set for it.

I have spent months on this attempting to figure out what is not occurring, and it appears that setting a GET value is not occurring and this includes any of the functions that use SET, be they Session, Cookies, etc. as well as what should be a simple hand off of values .

I do not like using GET URLS and would prefer to use the methods that use RESPONSE.FORM values, but see no easy way to accommodate them.

The process I use currently ( I am not including all the steps) is as follows:

  1. Establish a other Server Connect File “List.aspx”

  2. Global Value empty

  3. Connection =” Owners”

  4. Select * From Owners

  5. Output records in Owners in a Table Using App Connect Serverconnect 1

  6. Create a href=” Specific Record.html?identifier={{identifier}} to set filter value on new page.

  7. Establish a Server Connect File “ SpecificRecord.aspx”

  8. Global value =”identifier”

  9. Connection =” Owners”

  10. Query = Select * From Owners WHERE identifier=Get{{identifier}}

  11. Output specific record SpecificRecord.html?identifier= value [ based on value of chosen record ]

It does not work and never has, although if I use a Text Form to create a filter value it will work as anticipated.

I don’t know how else to explain it.

@wld, the server action get variable does not magically access and read your url parameters on your page.
On your page, you should define your url parameter under query parameters in the app structure.
The you should bind this query parameter as a value for the the get variable of your server action…
Please check:


and

It’s really not something requiring months of work, but just a couple of minutes.

Thank you for the responses, I was aware how to do this, but having the complete inability to insert or update pages took my eyes off the road.

Hi @wld,
Is it working now?