Is that possible to use != in query string?

2020-03-24 06:58发布

问题:

I am filtering sharepoint list using query string for some reson i need to check condition like FieldValue!=Red is that possible to achive?

Or still its limitation?

.aspx?FilterName=EYHealthIndicator&FilterMultiValue=Red;Yellow&&FilterField2=ContentType&FilterValue2!=Task

回答1:

You can't AFAIK.

The workaround MAY be to create a calculated column and then filter on that.

E.g. create a column called "Not-Red" with formula

=IF([YOUR_COLUMN_NAME]="Red","False","True")

Then filter

?FilterField1=Not-Red&FilterValue2=True



回答2:

You could use Sharepoint Designer to filter a new, dedicated view of that list. You need: 1) a queryString parameter like ?FilteredNotValue!=Red 2) Add filter in designer , operator = "Not Equal" , value = new parameter --> Name param = FilteredNotValue! --> Parameter Source = QueryString. Ending the name of the param with "!" is a trick but it seems could do the work.