Query on a data field

N

Nick Monsour

HELP!-HELP!-HELP!-HELP!-HELP!-HELP!-HELP!-HELP!-HELP!-HELP!-HELP!

Please help!
Hi all,

I have asked this question a few times and yet to get an answer.

I am using a SQL data source with secondary look up tables. This from
is used to save new user data and modify existing user data. So I get
basic user data of which Logon information is unique and based on if it
is a new user or modify user I want to display either all blank fields
or a mix of data fields that are read only (populated with existing
data) and blank fields to add and remove items. I would like it to work
it that if the modify user is selected in the drop down list a query is
run filtered on the Logon typed in the data field.

Is this possible? And if so how?

The only other way I can think is to ask the desired action up top and
then if it is modify use a Logon query field and have multiple views or
hidden section. But I would really like to know if there is a way to do
the first thing.

Thank you,

Nick
 
A

Andrew Watt [MVP - InfoPath]

Nick,

I have read your description a couple of times and still can't figure
out exactly what you are trying to do.

I don't know if Greg has a clearer understanding. But if I don't
understand the problem you are trying to solve it's difficult to
suggest an appropriate answer.

Do you, for example, have a form template with a single view and you
are trying to do everything in a single view?

Andrew Watt
MVP - InfoPath
 
N

Nick Monsour

Yes I have been trying to do it in a single view by using sections that
are hidden based on if it is a new user or modify user. If it is a new
user all I show is data entry fields that need to be filled in. If it
is a modify user I show a different section that uses data fields that
I have made read only as well as some of the data entry field to add
new user permissions. This is a computer user id form. Used to capture
what access a user has to programs and databases. So these permissions
need to be added and removed sometimes.
Thank you for answering and feel free to ask any questions that you
like.
 
A

Andrew Watt [MVP - InfoPath]

Yes I have been trying to do it in a single view by using sections that
are hidden based on if it is a new user or modify user. If it is a new
user all I show is data entry fields that need to be filled in. If it
is a modify user I show a different section that uses data fields that
I have made read only as well as some of the data entry field to add
new user permissions. This is a computer user id form. Used to capture
what access a user has to programs and databases. So these permissions
need to be added and removed sometimes.
Thank you for answering and feel free to ask any questions that you
like.

OK, Nick.

You have probably told me this before but it has all merged into one
confused blob in my mind.

Who is / are the users? Are they changing their own data? Or is some
admin person changing data about other people?

Andrew Watt
MVP - InfoPath
 
N

Nick Monsour

The users are employees. Some admin person changing data about other
people.
This form is designed to track and manage people's permissions
company wide, a few thousand people.
I'm sorry this is so hard to communicate; I am trying as best I can.
Thank you for everything!
 
A

Andrew Watt [MVP - InfoPath]

The users are employees. Some admin person changing data about other
people.
This form is designed to track and manage people's permissions
company wide, a few thousand people.
I'm sorry this is so hard to communicate; I am trying as best I can.
Thank you for everything!

You're welcome.

So let me break this into what I *think* are the tasks you are trying
to accomplish.

1. Add a new user
2. Query for information on existing users
3. Edit information on existing users

Are there other necessary tasks?

If those are the three tasks I would split the form into two views, I
think.

One view has the form controls to add information on a new user.

The other (default?) view has the form controls to query for
information and a button to submit the edited information. Add an "Add
New User" button to switch to the other (new user only) view.

At least that's how I would approach it, giving what I (rightly or
wrongly) understand of what you are trying to do.

If your response is "Oh but it's not as simple as that" we can try to
refine a little further.

Andrew Watt
MVP - InfoPath
 
N

Nick Monsour

Andrew,

I thought of that and it will work out fine. Be that as it may, what I
have been trying to figure out is in general if you have a text box
that is a data not a query field and if depending on the choice made in
a drop down list box is to amend user information, that action will
trigger a query based on the information that is in the data field.
This would avoid the use of button choices being the first thing the
user does.
I am just trying to make the form seamless. If that is the right word,
maybe just less buttons and not buttons first.

Thanks again,
Nick
 
A

Andrew Watt [MVP - InfoPath]

Andrew,

I thought of that and it will work out fine. Be that as it may, what I
have been trying to figure out is in general if you have a text box
that is a data not a query field and if depending on the choice made in
a drop down list box is to amend user information, that action will
trigger a query based on the information that is in the data field.
This would avoid the use of button choices being the first thing the
user does.
I am just trying to make the form seamless. If that is the right word,
maybe just less buttons and not buttons first.

Thanks again,
Nick

Nick,

I guess that in theory it might be possible to do what you want with
the drop down. You would need to do some fancy scripting. And ... for
me at least ... it just doesn't feel right. :)

Talk to your users. Ask them what they currently do. Or want to be
able to do.

My guess is that before adding a supposed new user that they need to
check if that user is already on the system. So the view containing
the query and data returned from the query would be the default view.

Yes, you could try to push everything into a single view. But, my
opinion anyway, is that the layout then becomes an issue.

If you have a complex form it is actually easier for the user to work
in views that do one single task well.

I wonder if that's the "first design pattern for InfoPath" - whether
it is right or wrong is a separate question. :)

I think if you choose the appropriate view as the default view that
"buttons first" shouldn't be a great problem.

Andrew Watt
MVP - InfoPath
 
N

Nick Monsour

Well I am in luck I am creating the first of the electronic forms and
there is only a paper system to this point. So I can do almost anything
as long as it is not to complex to use and it works. The issue was not
with the number of views but with the number of button and keeping the
form as simple as possible for the users. Believe it or not when I made
this form in testing they had a problem with using the optional
sections and adding rows to the repeating tables. With that in mind I
have been tasked with keeping it as simple to use as possible. At this
point I don't know VBScript but that is something else I will be
learning in the near future. By the way any good books on VBScript you
know of?

Thanks again for everything!
Nick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top