Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
nihalbuddy09
Creator II
Creator II

A button to generate a file with specified field value

Hi All,

I have created a button object called “Comments”; by using Add Actions ->External->Launch action and under the ‘Filename’ entered the excel file path, and I can able to see the excel file after one click on the button BUT instead of entire data I have a requirement to view the excel file based on “Region” field value selection (i.e. if I enter Region as ‘AS’, the excel file should be open with data that is related to that particular region only and rest of the regions data should not display).

Please help me out on this requirement so that I can be able to create a button accordingly.

Data.PNG

Data1.PNG

Thank you,

Nihal

1 Solution

Accepted Solutions
sinanozdemir
Specialist III
Specialist III

Hey Nihal,

I first try to do this without macros since they can cause some problems. What I did was to change the field selections to append to existing file. Although, I could only get this to work with csv files.

Capture.PNG

Let's see if you are happy with this, then we don't need to deal with macros. If not, then we will look into using macros.

Hope this helps.

View solution in original post

11 Replies
Chanty4u
MVP
MVP

u can create other button and use that select in field give dat region

nihalbuddy09
Creator II
Creator II
Author

Hi Suresh,

I have created the way you suggested but it's not working out.

sinanozdemir
Specialist III
Specialist III

Hi,

What you can do is to put an input box and assign a variable. You then add another action to the button to select in field based on the input box/variable value:

Capture.PNG

Capture.PNG

Hope this helps.

sinanozdemir
Specialist III
Specialist III

Here is the app, you need to change the path of export file.

nihalbuddy09
Creator II
Creator II
Author

Hi Sinan,

Thank you for your input on this but is it possible to open an excel file when we hit the button?, because in your app we are getting the data in the text box based on variable value but my requirement here is when I hit the button it should open an Excel file in the same window.

Why specifically I am asking about the excel file is because the user of that particular region will have to type his comments for the day in the "comment field" and export the data into different file by using 'export' action and further whenever the user hit the button in the following day the excel file should open again, here the previous day's comments will be updated and again exported/appended the data to existing exported file.

Thank you,

Nihal

sinanozdemir
Specialist III
Specialist III

Hey Nihal,

I would add three actions to the button:

Capture.PNG

So the first action "Select in Field" will filter the values based on the input box value and the second action "Export" exports the table to an excel/a csv sheet, then the third action "Launch" will open the exported excel/csv file for editing:

Capture.PNG

You can also look into using macros, but that might get a bit tedious.

Hope this helps.

nihalbuddy09
Creator II
Creator II
Author

Thank you Sinan, I will get back to you with my feedback.

nihalbuddy09
Creator II
Creator II
Author

Hi Sinan,

I got a small change in my requirement and now I have to show further more information in this process, as I didn't created the macros before, I am requesting some more help form your side.

- After the third action "Launch" will open the exported excel/csv file for editing:

In the fourth step/after editing the excel file (typing some comments for 'LX' Region), then I am doing save as this excel file in another desired location as Test1.xls, NOW I am repeating the 'first, second and third action's but here I am selecting the region as 'US' and updating the excel file with some comments for 'US' region, then I need to append this new data to the already existing Test1.xls file, would you please advise how can I add/append the data further in the same existing file.

Thank you for your continuous support in this process.

Nihal

sinanozdemir
Specialist III
Specialist III

Hey Nihal,

I first try to do this without macros since they can cause some problems. What I did was to change the field selections to append to existing file. Although, I could only get this to work with csv files.

Capture.PNG

Let's see if you are happy with this, then we don't need to deal with macros. If not, then we will look into using macros.

Hope this helps.