I want to make new variable search after making a date search variable, but using the found set from the search date - global-variables

I have a problem, new to filemaker. I want to make new variable search after making a date search variable, but using the found set from the search date.
show all records
show custom dialog [search :: xsearch category; search:: start date; search :: end date]
perform find
enter find mode
set variable [$date; value: machine transactions 2::service date]
perform find
What happens, is that I will find the category search "plotter" okay
but when I search again with the $date range, it will start to search again the my whole database and show also the other categories

Use "Constrain Found Set" script step instead of "Perform Find" in the second search.

Related

NetSuite System Notes CASE formula returning all notes

I've added a formula(date/time) column to a saved search in NetSuite, to return a system notes' date.
My CASE formula is returning all the system notes row's, and I would like a specific row's date i.e. 'POP Host Int ID' date.
How can I specify the row to return the date from, or remove the rows with no date that are not relevant?
CASE
WHEN {systemnotes.field} = 'POP Host Int ID' AND {systemnotes.type} = 'Set'
THEN {systemnotes.date}
ELSE NULL
END
It appears that my WHEN logic works to identify the record's system notes do contain an entry for 'POP Host Int ID' but in THEN I'm not specifying which row to get the date from so it returns all rows. And I could be wrong on this part.
Example results
Example System Notes for 1 record
Thank you for your assistance.
The CASE statement doesn't determine which rows are returned, only what data is returned for that field. On the other hand, the reference to the systemnotes table creates a join that causes each record result to be repeated for every system note entry.
To avoid this, add {systemnotes.field} = 'POP Host Int ID' and {systemnotes.type} = 'Set' as Filters in the Criteria tab instead of in the WHEN conditions. You can then just add the field under results instead of needing a formula.
Edit in response to comment below:
In cases where you need one result per base record (user), but they don't all have valid values from the joined table (system notes), I'd suggest grouping the results by user, and using aggregation functions for all the columns. EG: For the column in question I'm assuming you are getting one valid result and a lot of blanks per user. If you group by user and set the Summarize function to MAX, you should just get one result where the valid value is returned. If no valid value exists from the system notes, you would still get a result from the user and that field will be blank.
If you are creating a saved search the place to do this is in the criteria section.
The views you've shared are for the System Notes pertaining to a single record.
For those views you could just use the Field selector in the Filters section to select your POP Host Ing ID field.
For a saved search you would use the Advanced view and scroll down the criteria field list. Near the bottom are the System Notes. You can filter on Field, Date etc

Base one datetime filter on another datetime filter in SSRS Report Builder

I'm looking to either show an error message (fail) the report, if the end time filter is selected as being earlier than the start time filter, or disallow a user from selecting an end time that is before the currently selected start time.
Any ideas? I do not want to lose the pop up calendar functionality for the end time filter. I also don't want to set any kind of default value for the end time based on the start time.
I think Error message is your option.
I looked into this earlier, I couldn't find much on it. Can't really restrict what user can pick unless you want to put valid available dates into a dropdown. If you want the datepicker(popup calendar) and you don't want to set a default for end date based on startdate, then just let the user pick, check if #EndDate < #StartDate either in you query or in an expression of the item you choose to display your message to the user.
Hope it helps

Editing a Remedy User macro file.ARQ

Using BMC Remedy User v7.5 p004 to track/manage incidents. This tool has an option to record macros which are saved as a .ARQ file, I can open this file in Notepad++ but it is quite jumbled.
What I am trying to do is allow someone to search incidents based off of the summary that is put in the Working Log under the WorkInfo tab. I know that you can record macros that allow you to enter search variables that will prompt the end user, but when recording a macro the workinfo section is deactivated. So I would like to edit some pre-existing macros to try end create what I need.
SQL for what I want to pull
SELECT incidentno, summary, notes, summary*, notes*
FROM whatever the main table name is
WHERE WorkInfoType = WorkingLog
Note that the reason there are two summary and notes fields is because two of the fields are under the WorkingLog and the other two are fields listed for the whole incident. The BMC naming convention difference for these different fields is the *
Solved this by recording a macro out of the advanced search form within the incident management console. Within that form you can select the fields you want to search and there is an advanced button that brings up a query box for more complicated searching. After changing WorkInfoType on the form to equal "Working Log" I used the following advanced query to finish off the rest of the search.
( 'Summary' LIKE "%$Search Technical Name$%") AND ( 'Incident Status' = "Resolved" OR 'Incident Status' = "Closed" ) AND ( 'Assigned Group' = "Group1" OR 'Assigned Group' = "Group2" )
Note: When recording a maco you can enter $VariableName$ to make a variable. This will allow a user to enter text in a search box for whatever field you make a variable. So for example in the query I made a variable called titled "Search Technical Name", and this prompts the user to search the summary field when running the macro. Also, the % act as a wildcard search which will hit on not exact matches.

How to create prompt page driven variable view in Cognos 8.2

I am using Cognos 8.2 to create a report with a prompt page. I am trying to create a prompt page that allows the user to choose what type of item they want to see, and then the workers assigned.
Example: Show me the workers working on projects of type 'A' and that would trigger a list of workers to be displayed who are currently working on projects of type 'A' and then the user could choose a worker/workers from the list to be displayed in the report.
I am trying to use javascript in the html item, but I have never worked with javascript before, and I am having little luck. I dont know if it is even possible or not to pass a variable to another item on the prompt page. Any ideas or examples would be appreciated.
Bring your worker names into a data item (eg [People]) - then, create another data item with a case statement:
CASE
WHEN ([People] in ('John','Jessica','Jane','Jeff'))
THEN ('Group J')
WHEN ([People] in ('Adam', 'Alex', 'Anne'))
THEN ('Group A')
ELSE 'No Group'
END
Name this data item "Group"
Then create a filter on the query: [Group] = ?Group Prompt?
Then you should be able to input 'Group A' and get only those from Group A.

Asp.Net Sql Auto-Increment for Wall Post

I have a table that contains three columns.
"UserId" type-nvarchar
"PostAuthorId" type-nvarchar
"Post" type-text
This table will contain "wall" posts like in facebook for each user's page. I am going to use a gridview on each user's page to display the posts. The issue is I want to display them with the latest(most current) post being first and the earliest post being last.
I have never used autoincrement before and I am not sure if that is the answer. If it is, I do not know how to use it. I thought about adding a date posted column and then ordering by date.
If I end up using the date column, I could also display the date on the post. Is there a way to convert the date to a readable format?
What is the best way of implementing this type of ordering?
If you use AutoIcrement the first record will start with 1 and each record will increment from there. (default setting)
If you want to sort them by newest first do an ORDER BY ID DESC
I would suggest making a column called wallPostID then setting that to AutoIncrement and also your Primary Key
Date Formating:
If you are displaying this data in a gridView
Go to Edit Columns on your grid view
CLick on the Date field under "Selected Fields" on the bottom left
Under "BoundField properties" on the right Go to Data -> DataFormatString
{0:d} will display as 1/1/2010
This site has more info in string formatting
http://msdn.microsoft.com/en-us/library/fht0f5be.aspx
A datetime column would definitely work for something like this. Assuming you are using MS-SQL, you can also attach a default value to the column using a built-in function like GETDATE(). That way, you only have to input the data that matters and the database will take care of adding the datetime column.
For converting a datetime to a readable format try:
DateTime postDate;
string value = postDate.ToShortDateString();
You should always use an ID field that auto increments. Can also be used as your PK
I would suggest the DateTime field rather than the autoincrement simply because it will not only serve as an effective Sort field, it also preserves information that you may well want to display. If you want the most recent first you'll sort using the Date and a "DESC" modifier:
Select ... Order By [Date] DESC;
When you retrieve the data, you can retrieve it as a DateTime and modify it using C#. You can use "ToShortDateString()" as suggested by mdresser if you just wish to show the date or ToString("...") if you wish to show the time as well. You can also use SQL to convert it into a string before retrieving it:
convert(Varchar(10), #mydatetime, 101)
If you look in MSDN you'll see the various conversion codes (101 is the code used above) that can be used to translate the date in various ways.
UPDATE: You may want to use an autoincrementing field for your application for reasons other than your expressed need to sort wall entries. They are easy to use - just mark the field as an Identity if using SQL Server (other DBs are similar). As far as using them in your program, just think of the field as an Int field that you never have to set.
Now, why would you use a auto-incrementing field? Perhaps the most straightforward reason is so that they give you have an easy way to identify each record. For example, if you permit people to alter or delete their wall entries, the auto-incrementing field is ideal as it gives you a way to easily look up each record (each record will be assigned its own, unique value). You might put an "x" next to the record like StackOverflow does and make it a call back with the UID (auto-increment) value. Note that you should set up your primary key on the UID field if you'll be doing this.
Now, if you find them useful for this reason then you could also sort by the UID. I would still store the date so that you can provide Date and Time feedback as to when an entry was made on the wall but this would no longer be your indexed or sorted field.

Resources