web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to check specific values within range

(0) ShareShare
ReportReport
Posted on by 99

Hello guys,
in this screen capture I have a configuration table that the user can enter numbers in (the field type is string), there is a case in which the user can select numbers randomly by just inputting one then comma then another, and the other case is for it to be a range that uses all numbers between the two limits of the range (in this example 10001..10100, there are 5 numbers between: 10005, 10010, 10015, 10050, 10070) I wanted to fetch from this table informations concerning the checkboxes that are present here by using these numbers but I didn't know how to know how the numbers exisiting within the range

2860.PNG


The method I created is (Number here is refering to the string that I am checking:


while select theTableInTheScreenCapture
{
    if(match(mYNewTable.Number, theTableInTheScreenCapture.Number))
    {
        mYNewTable.CheckBox1 = theTableInTheScreenCapture.CheckBox1;
        mYNewTable.CheckBox2 = theTableInTheScreenCapture.CheckBox2;
}
    //else if (the case of an interval ..?)
}

Thanks in advance :) .

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Fares,

    Unfortunately, it is not clear to me what you want to achieve. In what table do you have the 5 numbers? What are the checkboxes about? Due to the language (French) I'm not able to understand the purpose of those fields. Despite my name is originally from France, I'm not speaking that language; except for a few words.

  • GirishS Profile Picture
    27,827 Moderator on at

    Hi Fares,

    You need to get comma separated numbers as a individual numbers from the configuration table right?

    Thanks.

  • Verified answer
    Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at

    Your code looks like that you have a single number (myNewTable.Number) and you're trying to find all records in theTableInTheScreenCapture where the number is mentioned or is in the range defined in Code rebrique.

    This look complicated, therefore before trying to do it, I would review your design. Maybe we can design the whole thing in a way that is easier to use.

    I would definitely try to avoid the need of interpretting Code rebrique by myself. It'll be much easier if you can use Code rebrique as a query range value.

    Also, remember that if you have problem to query your data, it means that your data model isn't suitable for your needs. You may need to fix your data model, not just code.

  • Suggested answer
    Muthusamy Profile Picture
    4 on at

    Hi Fares,

    Based on your existing data model,

    1. You can set the Parameter of Number Formats (6 digits as ######) 

    2. By Finding the row wise range check whether,

         a.  Range with Single Value (Get the value)

         b.  Range with Comma Separated Value (Split the value using comma)

         c.  Range with Dot Dot (Range the value using Dot Dot)

    Based on the above conditions, split the value and find the record.

    Thanks,

  • Fares Ben Miled Profile Picture
    99 on at

    Thank you everyone for your input, after discussing this with my project manger, she suggested what goshoom which is reviewing the desing (I'm using the data and didn't create any of this but it seems that it needs to be reviewed) as for Muthusamy your idea is also what I thought of but it seems I can't use since the data in the table is a bit messy (doesn't follow a structure like 6 digits as ######) so this solution can't apply unless the field labeled: code rubrique, is following that structure, Thank you all for your time.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 646 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans