Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4509 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Please see image below and then details:

How would you enable the editable field "Qty to Add" to highlight the selected record that has it's ID set in the global key field holder, when clicked in and has a value greater than or equal to 1?

User can click on the fields to the left of "Qty to Add" and it highlights them blue. These fields are applied a button and a conditional format.

The button script is:

Set Field [project_salesorder_SALESORDERLINEITEM::_kg_SalesOrderItemsKeyHolder;

Case (IsEmpty ( FilterValues ( project_salesorder_SALESORDERLINEITEM::__kp_SalesOrderLineItemID ; project_salesorder_SALESORDERLINEITEM::_kg_SalesOrderItemsKeyHolder ) ) ;

List ( project_salesorder_SALESORDERLINEITEM::_kg_SalesOrderItemsKeyHolder ; project_salesorder_SALESORDERLINEITEM::__kp_SalesOrderLineItemID ) ;

Let (

excl = Substitute ( ¶ & project_salesorder_SALESORDERLINEITEM::_kg_SalesOrderItemsKeyHolder & ¶ ; ¶ & project_salesorder_SALESORDERLINEITEM::__kp_SalesOrderLineItemID

& ¶ ; ¶ )

;

Middle ( excl ; 2 ; Length ( excl ) - 2 )

)

)

The conditional format formula (to highlight it as blue) is:

FilterValues (project_salesorder_SALESORDERLINEITEM::_kg_SalesOrderItemsKeyHolder ; project_salesorder_SALESORDERLINEITEM::__kp_SalesOrderLineItemID )

When a user clicks on the button once on the selected record, it highlights and sets the record ID into the _kg_SalesOrderItemsKeyHolder, if they click it again, it is removed, and the highlight disappears. This way the user can select the individual items they need.

The natural user response is too jump right to the "Qty to Add" field and enter a value, but if they don't click on the button fields to the left of it, the record ID is not set or deselected from the global key holder field.

Does anyone have a way to enable the Qty to Add field to behave like the button fields to its left and still be editable by the user?

post-71510-0-49701000-1342735048_thumb.j

Posted

The natural user response is too jump right to the "Qty to Add" field and enter a value

Looking at your images and reading your post, this was my thought as well - that the user shouldn't have to select the record and enter a qty. Just entering the quantity should be enough. Which could be accomplished by...

  1. modify the conditional formatting calc to be highlighted if the qty. is > 0

  2. get the list of "selected" records by either searching where the qty. is > 0, or via a relationship.
    (I can elaborate on these two methods, if need be)
Posted

Thanks DanSmith65 for the response. If you could further elaborate on these two methods that would be great! I'm fighting a migraine right now, so the brain function is low, but I thought I'd check in for responses before I give in and go to bed.

Posted

It will probably help if you explain what you need to do with the records after the user enters a qty. for the one's they want. For now, I'm going to assume you need to loop through those records.

It also looks like that layout is in list view, so you should be able to perform these steps to loop through the "selected" records...


Enter Find Mode

Set Field[ Qty ; ">0" ]

Constrain Found Set

If[ Get(FoundCount)=0 ]

    Show Custom Dialog[ "no records selected" ]

    Exit Script

End If

Go to Record/Request/Page[ First ]

Loop

    // do whatever you need to do with each record here

    Go to Record/Request/Page[ Next ; exit after last ]

End Loop

This topic is 4509 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.