Set occurrence labels from external file

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
manishcspro
Posts: 67
Joined: June 26th, 2017, 2:15 pm

Set occurrence labels from external file

Post by manishcspro »

I have 23 tables having different items of information. Total 294 items is distributed among 23 tables.
I want to show that if I select table 1 then only 69 items set for table 1 should be displayed in occurrence label.
I want to display the occurrence labels dynamically based on the table selected in ID items.
If I paste all the 294 items label using dictionary Occurrence Labels the all the 294 item are populated in every table selection.
Presently I am using set occurrence label function to populate row occurrence labels based of item code entered.
But each time the cursor moves to the next column the form refreshes using the set occurrence label function.
Please suggest me the appropriate method. The list of item code and their labels is attached.
Attachments
revised_MPR_item_name_and_Unit.xlsx
(26.86 KiB) Downloaded 134 times
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: Set occurrence labels from external file

Post by sherrell »

Hi Manish,

This is a classic usage of a lookup table. Create a DCF with a single record, using dept_code as your ID. The remaining data would be DCF items within that record (item_code, item_label, unit).

https://www.csprousers.org/forum/viewto ... les#p13599

You can then do a loadcase for the dept_code you're interested in, and use its records to dynamically create a value set for your current variable. There are a lot of threads on that within the forum, here's a recent one:

https://www.csprousers.org/forum/viewto ... set#p10354

Sherrell
manishcspro
Posts: 67
Joined: June 26th, 2017, 2:15 pm

Re: Set occurrence labels from external file

Post by manishcspro »

I just want to use the set occurrence labels with condition to fill the occurrence labels based on department code and corresponding item codes.
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: Set occurrence labels from external file

Post by sherrell »

You can certainly hard-code all of that in your program. Do the second part of what I recommended, creating your value set dynamically, but have those 294 codes in your program, rather than fetching them from a lookup file.

Sherrell
Post Reply