Skip to main content

Notifications

Microsoft Dynamics SL (Archived)

User3 (float) field - List

Posted on by 136

I'm trying to setup a new custom field that emulates a Checkbox field since User1,2,5,6 have already been user. I tried adding the User3 field with a list of either 0 or 1 but it's not working. Can you have a list value on a float field? I can't find any info on whether this is possible or not.

*This post is locked for comments

  • Apps Mexico Profile Picture
    Apps Mexico 1,090 on at
    RE: User3 (float) field - List

    No, actually you can achive this using SL customization manager. Just need to add a module with the CheckBoxTemp type and add the rest of the code on the ThisScreen object.

    This is an example of the stucture code.

    Option Explicit
    Type CheckBoxTemp 
    User3 As String * 1
    End Type
    Public bCheckBoxTemp  As CheckBoxTemp , nCheckBoxTemp  As CheckBoxTemp 
    Public CSR_CheckBoxTemp  As Integer
    Public serr_CheckBoxTemp  As Integer

  • LsmithWipfli Profile Picture
    LsmithWipfli 136 on at
    RE: User3 (float) field - List

    Thank you for the response. This sounds like a Visual Basic update instead of using SL customization manager. Do I need to create a custom form for them to be able to do your steps?

  • Apps Mexico Profile Picture
    Apps Mexico 1,090 on at
    RE: User3 (float) field - List

    The checkbox control only works with char, smallint and int fields. If you want to use a float field you gonna need to do a workaround, that could be something like this.

    1. Add a notbound structure with a property of type string * 1. Example (Type CheckBoxTemp User3 string * 1 End Type Public bCheckBoxTemp as CheckBoxTemp)
    2. Call the SetAddr method on the form load event and pass the bCheckBoxTemp with NOLEVEL flag as parameters. 
    3. Add the checkbox control using any of the char fields that you have avalible, even the non user fields.
    4. Edit the fieldname property of this control and change to something like "bCheckBoxTemp.User3;0;0;1"
    5. Now, when the user changes the value of the field you can use the SetBufferValue method to change the the bTable.User3 
    6. And to get the value you can use the GetBufferValue and after that set the bCheckBoxTemp.User3 = vUser3 and the DispField method to display the value on the screen.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans