Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8387891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:20:24+00:00 2026-06-09T18:20:24+00:00

Essentially, this is what I’m faced with: I want to modify the InventTrans form

  • 0

Essentially, this is what I’m faced with:

  1. I want to modify the InventTrans form
  2. By default, it has the entire InventTrans datasource set to AllowEdit = No
  3. I want to enable editing on ONE new Enum field (NoYes type)

Should I set the InventTrans datasource to AllowEdit = Yes and then painfully change 40+ fields in the datasource to be AllowEdit = No, OR is there a way to programmatically iterate through the fields of the datasource and set this property by name? (Please say there is, or an equally easy way to do this!)

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:20:26+00:00Added an answer on June 9, 2026 at 6:20 pm

    This is how I would try to disable editing to all fields:

    DictTable    dictTable;
    DictField    dictField;
    int          fldCnt;
    ;
    dictTable = new DictTable(tablenum(InventTrans));
    for (fldCnt = 1; fldCnt <= dictTable.fieldCnt() ; fldCnt++)
    {
        dictField = new DictField(tablenum(InventTrans), dictTable.fieldCnt2Id(fldCnt));
        info(strfmt("%1", dictField.id(),dictField.name()));
        InventTrans_DS.object(dictField.id()).allowEdit(false);
    }
    

    EDIT: Better approach to iterate through form’s DS’es fields only:

    DictTable           dictTable;
    DictField           dictField;
    int                 fldCnt;
    QueryBuildFieldList qBFL;
    ;
    qBFL = InventTrans_DS.query().dataSourceTable(tablenum(InventTrans)).fields();
    for (fldCnt = 1; fldCnt <= qBFL.fieldCount() ; fldCnt++)
    {
        dictField = new DictField(tablenum(InventTrans), qBFL.field(fldCnt));
        info(strfmt("%1 %2 ", dictField.id(),dictField.name()));
        if(InventTrans_DS.object(qBFL.field(fldCnt))) //exception recVersion for example
        {
            InventTrans_DS.object(qBFL.field(fldCnt)).allowEdit(false);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question has been bugging me for a long time now but essentially I'm
So essentially this is what I want to do, do{ Object name = new
My situation is essentially this: I have a class called Foo which has dependencies
So I have a DOM document that looks essentially like this <categories> <category id=1/>
I have a schema that essentially looks like this: CREATE TABLE `data` ( `id`
I'm writing a cache-eject method that essentially looks like this: while ( myHashSet.Count >
Evening, I've no training in Databases, and I'm a bit lost. Essentially I've this
This questions involves 2 different implementations of essentially the same code. First, using delegate
Essentially, is there any way to make this code legal? main = print .
So I essentially need to do this: String text = line1\n; text += line2\n;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.