Need help with script

Need a little help with some code.

Created a view to show filtered names a dropdown menu (1 = active 0 = inactive) Only want to show active names.

I need to show active names from a column named SWACTV within a table ARPP. The other two columns are codeslsp(people initials) and nameempl (employee name)

SELECT ((Form = “ARPP”))

can someone help me with a way to only show the “1’s”(active)

Thank you

Subject: need help with script

Are you looking for a view selection formula to show only active people?

Subject: RE: need help with script

Thnaks Christopher.yes, I think that might do it.

Subject: RE: need help with script

I don’t know what your “active” field is named, but assuming it is named “active,” this would be your view selection formula:

SELECT Form = “ARPP” & active = “1”

Subject: RE: need help with script

I entered the script and I get the error when trying to run"Select is inappropriate for this type of formula".

Subject: RE: need help with script

The formula I gave you is for a view selection formula. This is the formula which is placed into the “view selection” area of a Notes view. This is not used in a form/document to display data. Where exactly are you placing this formula?

Subject: RE: need help with script

I put this into the Programmers Pane in DesignerObjects ARSAP1

Then View selection SELECT Form = “ARSAP1” & SWACTV = “1”

Subject: RE: need help with script

What type of field is SWACTV? Text or Number?

If Number field, make the selection formula as

Select Form = “ARSAP1” & SWACTV = 1 (remove double quotes)

If text field, your selection formula seems ok.

Subject: RE: need help with script

I created a view called ARSAP1. This is exactly the same as the original view ARSAP except I added a column SWACTV which holds the values 1 or 0 for active or inactive.

This is the code I used in the view selction

SELECT Form = “ARSAP1” & SWACTV = 1

It is not working. Any suggestions?

Thank you

Subject: RE: need help with script

Narasimhan;Still will not filter out the inactive names.

SWACTV is a column. I am not sure how I can change the attributes so it will filter out the “0s”.

Subject: RE: need help with script

SELECT Form = “ARSAP1” & SWACTV = 1

I am hoping that SWACTV is an integer field on the form.

Try the same select formula in this way:

SELECT Form = “ARSAP1” & @Text(SWACTV) = “1”

Subject: RE: need help with script

Thank you all.