All of the ID fields were not filled, please reenter

Other discussions about CSPro
nimbona
Posts: 28
Joined: June 2nd, 2018, 2:43 pm

All of the ID fields were not filled, please reenter

Post by nimbona »

Hello everyone,
I need help please. When i run my data entry application i get this message"All of the ID fields were not filled, please reenter".

Thank you in advance
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: All of the ID fields were not filled, please reenter

Post by josh »

In order to have a complete case in CSPro you must enter values for all the id variables from the dictionary (the variables in the id-items section). You probably have one or more of the id-items from your dictionary that you did not drag onto the form and are therefore not getting filled in.
nimbona
Posts: 28
Joined: June 2nd, 2018, 2:43 pm

Re: All of the ID fields were not filled, please reenter

Post by nimbona »

thank you Josh,
But i see that there is no item not drug into form. That error comes when i try to put an external dictionnary on an other dictionnary in order to put the two dictionnary as one
nimbona
Posts: 28
Joined: June 2nd, 2018, 2:43 pm

Re: All of the ID fields were not filled, please reenter

Post by nimbona »

Thank very much Josh,
I see that i have not drop item from internal dictionnary. The problem that i have for the moment is to drop item from external dictionnary. When i finish to write on the internal dictionnary, the cursur return one that internal dictionnary, but i want to continue to the external dictionnary.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: All of the ID fields were not filled, please reenter

Post by josh »

You cannot drop fields from an external dictionary onto a form with fields from the main dictionary. It is not common to need to key fields from an external dictionary. External dictionaries are generally used to lookup or save auxiliary data. You may want to consider using multiple records in your main dictionary instead. That way you have different data records but all in the same data file. It is generally simpler to have all your data in one data file, otherwise it can be tricky to link the data from the external file back to the main data file.

If you really want to save the data using the external dictionary you have two options:

1) Make copies of the variables from your external dictionary and add them to your main dictionary. Put the copied fields from the main dictionary onto your form and after they are entered assign the values of the variables in the main dictionary to the variables in the external dictionary and then call writecase on your external dictionary.

2) Use an external form file. External forms can have fields from an external dictionary. Take a look at the "Using External Files & Forms" example in the CSPro examples directory.

External forms require a pretty advanced understanding of CSPro so I would probably go with option 1.
VirtuesArios
Posts: 22
Joined: June 2nd, 2022, 5:55 am

Re: All of the ID fields were not filled, please reenter

Post by VirtuesArios »

Hello I am George and new to CSPro, I having the same error message and I attached and image file of what I was working on but it seems I'm having errors as will. Could you enlighten me on option 1?
CS Pro.jpg
CS Pro.jpg (101.9 KiB) Viewed 791 times
htuser
Posts: 600
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: All of the ID fields were not filled, please reenter

Post by htuser »

It's because ID items are mandatory in CSPro (in the screen you posted: MENU_ID). And, because usually you don't need to save any data from a menu, CSProusers always try to design menu's screen without any ID items... I would advise you three solutions:
1) Fill automatically the ID item(s) of the menu with a value even if you don't put it on the form;
2) Using HTML UI to display the main menu. In his actual fashion the CSPro Developer Team give two ways to design HTML UI for CSPro:
  • a) HTML Dialog, the main way;
    b) Adding the HTML UI file as an external file ... as a Report. It's the best way because:
    • i) you can compile (preview) it inside the CSPro designer;
      ii) You can write any CSPro Logic directly inside it without calling them in the JS-CSPro API;
      iii) It's attached to the CSPro app, so you don't need to have any care about path...
It's because, rather than Report, i ask the Developer Team to rename it as "HTML UI".
3) Using a dynamic on the fly menu. In this way you don't need to have any field on the screen (form) of the main menu.You will display all inside popup window... Greg called this way, 99% different from other CSProusers...
Best,
Last edited by htuser on July 8th, 2022, 1:27 am, edited 2 times in total.
G.VOLNY, a CSProuser from Haiti, since 2004
VirtuesArios
Posts: 22
Joined: June 2nd, 2022, 5:55 am

Re: All of the ID fields were not filled, please reenter

Post by VirtuesArios »

Is there any tutorials on how to start with HTML so I could revise my program in such a way it would run and work on HTML UI, Thanks for the advice.
sherrell
Posts: 314
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: All of the ID fields were not filled, please reenter

Post by sherrell »

When developing a CSPro application you generally want to use the CSPro functions and keywords available to you. HTML is usually used for reports or to have tighter control on fonts or colors in a dialog. Neither of which applies in this case, and for a new user, you really shouldn't be worrying about the second item.

I would suggest following the first suggestion HTUser gave you, prefilling the menu_id. Since you never write a case generated from the menu (your input data file for a menu application should be "none"), then you can just preset it to the same value every time, or a random # during the session, etc. Do so in the preproc for the item. If your menu_id is only 1 digit (no need for it to be longer), you could write:

Code: Select all

PROC MENU_ID
preproc
  $ = random(0,9);
  noinput;
Be sure menu_id is first in the key order.

p.s. I recognize you were picking up on a previous thread, but this type of message should be posted to the "Entry" section, especially given the age of the original post (4 years ago!). Thanks.

Sherrell
htuser
Posts: 600
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: All of the ID fields were not filled, please reenter

Post by htuser »

:D :D :D Ah Ah Ah!
HTML is usually used for reports or to have tighter control on fonts or colors in a dialog.
However, in the CSPro help we can see:
HTML is used in CSPro in a variety of ways, including for displaying some dialogs for logic functions, as well as other aspects of the CSPro user interface (UI).
I know , there's lot of fans of the more than two decades old fashion CSPro form UI among the CSPro Developer Team...
Hopefully there's also fans of modern HTML UI in the Team. Among others, the author of this sentence, Greg:
In the long run, we'll likely move nearly all text you see to HTML, at which point this could be customized.


Hope a day where we'll have only the modern UI in CSPro...
Best,
G.VOLNY, a CSProuser from Haiti, since 2004
Post Reply